Day and night detection based on one or more of illuminant detection, lux level detection, and tiling

ABSTRACT

A method, executed at a camera with a Night mode and a Day mode, determines when to switch from Night mode to Day mode using one or more of: illuminant detection (detecting the type of illuminant providing ambient light based on R/G and B/G component ratios of the ambient light), lux detection (detecting the ambient light level), and tiling (performing illuminant detection and/or lux detection for sub-regions of an image sensor array so as to detect localized/narrow beam/point light sources that only illuminate a portion of a scene or are directed at the camera lens). Based on identification of the illuminant type, switching from Night mode to Day mode is done at different lux levels for different types of illuminants. E,g. when the light is due to sunlight or incandescent light switching to Day mode is done at higher lux than when the light is from other sources of visible light.

RELATED APPLICATIONS

This application is related to the following application, which ishereby incorporated by reference in its entirety: U.S. patentapplication Ser. No. 14/723,276, filed on May 27, 2015, entitled,“Multi-mode LED Illumination System.”

TECHNICAL FIELD

The disclosed implementations relate generally to controlling a camerawith day and night modes, including, but not limited, deciding when tochange a camera from night to day mode.

BACKGROUND

Some security cameras operate in one of two modes depending on theambient lighting conditions. Day mode is used when there is sufficientambient light to adequately illuminate the scene. Night mode (or IRmode) is used when there is not enough ambient light to adequatelyilluminate the scene, in which case the camera can provide its own IRillumination (e.g., using onboard IR LEDs).

One challenge for such cameras is deciding when to switch from Nightmode to Day mode. Typically, Night mode is maintained until the cameradetects an external light source that provides enough light for Day modeoperation. This is a challenge in Night mode as the camera needs toevaluate the amount of visible ambient light from external lightsources, but many light sources provide a combination of both IR andvisible light, and in Night mode the camera sensor is responsive to bothIR and visible light.

As a result, in a situation where a light source provides a highproportion of IR light in comparison to visible light, a camera in Nightmode can switch into Day mode even though there is not enough visibleambient light to illuminate the scene. This can result in oscillationsbetween Day mode and Night mode (e.g., after switching from Night to Daymode, the camera will determines that there is not enough visible lightfor Day mode operation, so will switch back to Night mode, and so on).

Traditional mode switching methods are also commonly fooled intoswitching from Night mode to Day mode in response to bright butnarrow-beam light sources, such as flashlights or car headlights, thatonly provide light for a small portion of a scene. When exposed to suchlights a camera will often switch to Day mode, which results in capturedimages being almost entirely dark due to lack of adequate ambient light.

SUMMARY

Accordingly, there is a need for a security camera that implements moreeffective methods for deciding when to switch from Night mode to Daymode.

In accordance with some implementations, systems and methods aredescribed herein that provide more effective Night mode to Day modeswitching in a camera. The described systems and methods provide one ormore advantages in comparison to prior methods:

-   -   reduce Night mode to Day mode to Night mode oscillations;    -   address false Day mode situations (e.g., when a flashlight in a        scene triggers the camera to switch to Day mode);    -   reliably detect visible illuminants containing high levels of        infrared (e.g. sunlight or incandescent light sources) and        adjust Night to Day mode switching thresholds accordingly; and    -   have more consistent lux level switching regardless of        illuminant color temperature.

In particular, the systems and methods described herein utilize acombination of illuminant detection, lux level detection, and tiling todetermine when to switch from Night mode to Day mode without theattendant problems observed in prior art approaches to mode switching.

In some implementations, a method for Night to Day mode switching isperformed at a camera including a controller, memory storinginstructions for execution by the controller, a color sensor arraycomprising a plurality of sensor locations, the sensor locationsincluding first, second and third pixels each having respective peakresponses at different respective visible light frequencies, and a lensassembly that is configured to focus light on the sensor array. Themethod includes: when the camera mode is a night mode and the sensor isexposed to ambient light via the lens assembly: detecting a first lightcomponent of the ambient light by averaging output signals from thefirst pixels; detecting a second light component of the ambient light byaveraging output signals from the second pixels; detecting a third lightcomponent of the ambient light by averaging output signals from thethird pixels; determining based on respective values of the first,second and third light components whether the ambient light is due toother an IR light source; detecting the ambient light level; based on adetermination that the ambient light is due to other than an IR lightsource and the ambient light level exceeds a first lux threshold,initiating a change of the camera mode to a day mode; based on adetermination that the ambient light is due to other than an IR lightsource and the ambient light threshold does not exceed the first luxthreshold, maintaining the camera in the night mode.

In some implementations, the method further includes: determining basedon values of the first, second and third light components whether theambient light is due to sunlight or an incandescent light source; andbased on a determination that the ambient light is due to sunlight or anincandescent light source, initiating a change of the camera mode to theday mode only when the ambient light level exceeds a second luxthreshold higher than the first lux threshold.

In some implementations, the method further includes: obtaining a firstratio of the first to the second lighting components of the ambientlight; obtaining a second ratio of the third to the second lightingcomponents of the ambient light; and obtaining a graph characterizingrespective types of light source based on a combination of the first andsecond ratios associated with the respective types of light sources;wherein determining whether the ambient light is due to other than an IRlight source includes determining based on the graph whether a lightsource characterized by the first ratio and the second ratio is otherthan an IR light source.

In some implementations, the graph recited above identifies a firstregion defined by specific respective ranges of the first and the secondratios as being associated with sunlight or incandescent light sources;wherein determining whether the ambient light is due to sunlight or anincandescent light source includes determining based on the graphwhether a point defined by the first ratio and the second ratio lieswithin the first region.

In some implementations, the first, second and third light componentsare red, green and blue.

In some implementations, determining whether the ambient light is due toother than an IR light source includes determining that a point definedby the first ratio and the second ratio is substantially different from(1, 1).

In some implementations, the camera includes a gain controller thatadjusts analog gain of the sensor array based on the ambient lightlevel; such that detecting the ambient light level includes obtainingthe analog gain of the sensor array.

In some implementations, the analog gain of the sensor varies with aframe rate of the camera, the method further including: determining afirst frame rate of the camera used to detect the first, second andthird light components; and normalizing the obtained analog gain of thesensor based on a first difference between the first frame rate and apredefined frame rate and predefined associated differences in analogsensor gain based on the first difference.

In some implementations, the camera includes an IR filter with a firstposition in which it is interposed between the lens and the sensor arrayand a second position in which it is not interposed between the lens andsensor array, the method further including: as part of initiating achange of the camera mode to the day mode, switching the camera mode tothe day mode and causing the IR filter to be moved from the secondposition to the first position.

In some implementations, the camera includes an auto white balanceprocessor that provides the obtained first and second ratios.

In some implementations, the color sensor array is one tile of aplurality of tiles in a color sensor array system and the method ofclaim 1 is performed for each of the tiles, such that a respective modechange signal is generated for a respective tile for which the ambientlight at that respective tile is due to other than an IR light sourceprior to initiating the change of the camera mode to the day mode; themethod further comprising: determining a total number of the mode changesignals for the color sensor array system; determining whether the totalnumber of the mode change signals exceeds a predetermined mode changethreshold based on a total number of tiles in the color sensor arraysystem; and when the total number of the mode change signals exceeds themode change threshold, initiating the change of the camera mode to theday mode.

In some implementations, the graph recited herein is represented usingtwo look-up tables, each addressable by a first index representing oneof the first ratios and a second index representing one of the secondratios; wherein a first one of the lookup tables defines combinations ofthe first and second ratios associated respectively with IR lightsources and other than IR light sources, and a second one of the lookuptables defines combinations of the first and second ratios associatedwith sunlight and incandescent lights.

In some implementations, the first lookup table encodes with 1's firsttable locations associated with other than IR light sources and with 0'sfirst table locations associated with IR light sources, such that thefirst lookup table is almost entirely filled with all 1's apart fromtable locations associated with pairs of first and second ratiossubstantially similar to (1.1).

In some implementations, the second lookup table corresponds to ahigher-resolution version of a sub-region of the first lookup table,wherein the second lookup table encodes with 1's second table locationsassociated with sunlight and incandescent light sources and with 0'ssecond table locations associated with other than sunlight andincandescent light sources.

In yet another aspect, some implementations include a system forcontrolling a camera mode including: a controller, memory storing one ormore programs for execution by the controller, a color sensor arraycomprising a plurality of sensor locations, the sensor locationsincluding first, second and third pixels each having respective peakresponses at different respective visible light frequencies, and a lensassembly that is configured to focus light on the sensor array, the oneor more programs including instructions for performing any of themethods described herein (e.g., any of the methods described above).

In yet another aspect, some implementations include a non-transitorycomputer-readable storage medium storing one or programs for executionby a camera system that includes a controller, memory storing one ormore programs for execution by the controller, a color sensor arraycomprising a plurality of sensor locations, the sensor locationsincluding first, second and third pixels each having respective peakresponses at different respective visible light frequencies, and a lensassembly that is configured to focus light on the sensor array, the oneor more programs including instructions for performing any of themethods described herein (e.g., any of the methods described above).

Thus, a camera and camera program modules are provided that implementmore effective methods for deciding when to switch from Night mode toDay mode. Such methods may complement or replace conventional methodsfor controlling camera modes.

BRIEF DESCRIPTION OF THE DRAWINGS

For a better understanding of the various described implementations,reference should be made to the Description of Implementations below, inconjunction with the following drawings in which like reference numeralsrefer to corresponding parts throughout the figures.

FIG. 1 is an example smart home environment, in accordance with someimplementations.

FIG. 2 is a block diagram illustrating an example network architecturethat includes a smart home network, in accordance with someimplementations.

FIG. 3 illustrates a network-level view of an extensible devices andservices platform with which the smart home environment of FIG. 1 isintegrated, in accordance with some implementations.

FIG. 4 illustrates an abstracted functional view of the extensibledevices and services platform of FIG. 3, with reference to a processingengine as well as devices of the smart home environment, in accordancewith some implementations.

FIG. 5A is a representative operating environment in which a hub deviceserver system interacts with client devices and hub devicescommunicatively coupled to local smart devices, in accordance with someimplementations.

FIG. 5B is a representative operating environment in which a videoserver system interacts with client devices and hub devicescommunicatively coupled to local smart devices, in accordance with someimplementations.

FIG. 6 is a block diagram illustrating a representative hub device, inaccordance with some implementations.

FIG. 7A is a block diagram illustrating a representative hub deviceserver system, in accordance with some implementations.

FIG. 7B is a block diagram illustrating a representative video serversystem, in accordance with some implementations.

FIG. 7C is a block diagram illustrating a representative clientinterface server, in accordance with some implementations.

FIG. 7D is a block diagram illustrating a representative camerainterface server, in accordance with some implementations.

FIG. 8A-8B are block diagrams illustrating a representative clientdevice associated with a user account, in accordance with someimplementations.

FIG. 9A is a block diagram illustrating a representative smart device,in accordance with some implementations.

FIG. 9B is a block diagram illustrating a representative video capturingdevice (e.g., a camera), in accordance with some implementations.

FIG. 9C is a block diagram illustrating a data structure used to storeraw pixel data for a camera, in accordance with some implementations.

FIG. 9D is a block diagram illustrating a data structure used to storeauto white balance (AWB) data for a camera, in accordance with someimplementations.

FIG. 10 is a block diagram illustrating a representative smart homeprovider server system, in accordance with some implementations.

FIG. 11A is a graph of R/G vs. B/G (where R, G, and B represent red,green and blue illuminant components) for different lighting conditions.

FIG. 11B is a graph of R/G vs. B/G (where R, G, and B represent red,green and blue illuminant components) for different lighting conditions,highlighting a sub-region associated with sunlight and incandescentlights.

FIG. 12A is an image from a camera showing a result of transitioningfrom Night mode to Day mode when there is not enough visible light inthe scene.

FIG. 12B is an image from a camera showing a result of deciding not totransition from Night mode to Day mode in the lighting conditions ofFIG. 12A, in accordance with some implementations.

FIG. 12C is an illustration of a tiled arrangement used for processingambient light in Night mode in accordance with some implementationsoverlaid on the image of FIG. 12B.

FIG. 13A is a flowchart of a program for deciding when to switch fromNight mode to Day mode, in accordance with some implementations.

FIG. 13B is a block diagram illustrating an all lights lookup table(LUT) stored in a camera, in accordance with some implementations.

FIG. 13C is a block diagram illustrating a sunlight lookup table (LUT)stored in a camera, in accordance with some implementations.

FIGS. 14A-14C illustrate a flowchart diagram of a method for decidingwhen to switch from Night mode to Day mode in accordance with someimplementations.

Like reference numerals refer to corresponding parts throughout theseveral views of the drawings.

DESCRIPTION OF IMPLEMENTATIONS

Reference will now be made in detail to implementations, examples ofwhich are illustrated in the accompanying drawings. In the followingdetailed description, numerous specific details are set forth in orderto provide a thorough understanding of the various describedimplementations. However, it will be apparent to one of ordinary skillin the art that the various described implementations may be practicedwithout these specific details. In other instances, well-known methods,procedures, components, circuits, and networks have not been describedin detail so as not to unnecessarily obscure aspects of theimplementations.

It will also be understood that, although the terms first, second, etc.are, in some instances, used herein to describe various elements, theseelements should not be limited by these terms. These terms are only usedto distinguish one element from another. For example, a first userinterface could be termed a second user interface, and, similarly, asecond user interface could be termed a first user interface, withoutdeparting from the scope of the various described implementations. Thefirst user interface and the second user interface are both types ofuser interfaces, but they are not the same user interface.

The terminology used in the description of the various describedimplementations herein is for the purpose of describing particularimplementations only and is not intended to be limiting. As used in thedescription of the various described implementations and the appendedclaims, the singular forms “a”, “an” and “the” are intended to includethe plural forms as well, unless the context clearly indicatesotherwise. It will also be understood that the term “and/or” as usedherein refers to and encompasses any and all possible combinations ofone or more of the associated listed items. It will be furtherunderstood that the terms “includes,” “including,” “comprises,” and/or“comprising,” when used in this specification, specify the presence ofstated features, integers, steps, operations, elements, and/orcomponents, but do not preclude the presence or addition of one or moreother features, integers, steps, operations, elements, components,and/or groups thereof.

As used herein, the term “if” is, optionally, construed to mean “when”or “upon” or “in response to determining” or “in response to detecting”or “in accordance with a determination that,” depending on the context.Similarly, the phrase “if it is determined” or “if [a stated conditionor event] is detected” is, optionally, construed to mean “upondetermining” or “in response to determining” or “upon detecting [thestated condition or event]” or “in response to detecting [the statedcondition or event]” or “in accordance with a determination that [astated condition or event] is detected,” depending on the context.

It is to be appreciated that “smart home environments” may refer tosmart environments for homes such as a single-family house, but thescope of the present teachings is not so limited. The present teachingsare also applicable, without limitation, to duplexes, townhomes,multi-unit apartment buildings, hotels, retail stores, office buildings,industrial buildings, and more generally any living space or work space.

It is also to be appreciated that while the terms user, customer,installer, homeowner, occupant, guest, tenant, landlord, repair person,and the like may be used to refer to the person or persons acting in thecontext of some particularly situations described herein, thesereferences do not limit the scope of the present teachings with respectto the person or persons who are performing such actions. Thus, forexample, the terms user, customer, purchaser, installer, subscriber, andhomeowner may often refer to the same person in the case of asingle-family residential dwelling, because the head of the household isoften the person who makes the purchasing decision, buys the unit, andinstalls and configures the unit, and is also one of the users of theunit. However, in other scenarios, such as a landlord-tenantenvironment, the customer may be the landlord with respect to purchasingthe unit, the installer may be a local apartment supervisor, a firstuser may be the tenant, and a second user may again be the landlord withrespect to remote control functionality. Importantly, while the identityof the person performing the action may be germane to a particularadvantage provided by one or more of the implementations, such identityshould not be construed in the descriptions that follow as necessarilylimiting the scope of the present teachings to those particularindividuals having those particular identities.

FIG. 1 is an example smart home environment 100 in accordance with someimplementations. Smart home environment 100 includes a structure 150(e.g., a house, office building, garage, or mobile home) with variousintegrated devices. It will be appreciated that devices may also beintegrated into a smart home environment 100 that does not include anentire structure 150, such as an apartment, condominium, or officespace. Further, the smart home environment 100 may control and/or becoupled to devices outside of the actual structure 150. Indeed, one ormore devices in the smart home environment 100 need not be physicallywithin the structure 150. For example, a device controlling a poolheater 114 or irrigation system 116 may be located outside of thestructure 150.

The depicted structure 150 includes a plurality of rooms 152, separatedat least partly from each other via walls 154. The walls 154 may includeinterior walls or exterior walls. Each room may further include a floor156 and a ceiling 158. Devices may be mounted on, integrated with and/orsupported by a wall 154, floor 156 or ceiling 158.

In some implementations, the integrated devices of the smart homeenvironment 100 include intelligent, multi-sensing, network-connecteddevices that integrate seamlessly with each other in a smart homenetwork (e.g., 202 FIG. 2) and/or with a central server or acloud-computing system to provide a variety of useful smart homefunctions. The smart home environment 100 may include one or moreintelligent, multi-sensing, network-connected thermostats 102(hereinafter referred to as “smart thermostats 102”), one or moreintelligent, network-connected, multi-sensing hazard detection units 104(hereinafter referred to as “smart hazard detectors 104”), one or moreintelligent, multi-sensing, network-connected entryway interface devices106 and 120 (hereinafter referred to as “smart doorbells 106” and “smartdoor locks 120”), and one or more intelligent, multi-sensing,network-connected alarm systems 122 (hereinafter referred to as “smartalarm systems 122”).

In some implementations, the one or more smart thermostats 102 detectambient climate characteristics (e.g., temperature and/or humidity) andcontrol a HVAC system 103 accordingly. For example, a respective smartthermostat 102 includes an ambient temperature sensor.

The one or more smart hazard detectors 104 may include thermal radiationsensors directed at respective heat sources (e.g., a stove, oven, otherappliances, a fireplace, etc.). For example, a smart hazard detector 104in a kitchen 153 includes a thermal radiation sensor directed at astove/oven 112. A thermal radiation sensor may determine the temperatureof the respective heat source (or a portion thereof) at which it isdirected and may provide corresponding blackbody radiation data asoutput.

The smart doorbell 106 and/or the smart door lock 120 may detect aperson's approach to or departure from a location (e.g., an outer door),control doorbell/door locking functionality (e.g., receive user inputsfrom a portable electronic device 166-1 to actuate bolt of the smartdoor lock 120), announce a person's approach or departure via audio orvisual means, and/or control settings on a security system (e.g., toactivate or deactivate the security system when occupants go and come).

The smart alarm system 122 may detect the presence of an individualwithin close proximity (e.g., using built-in IR sensors), sound an alarm(e.g., through a built-in speaker, or by sending commands to one or moreexternal speakers), and send notifications to entities or userswithin/outside of the smart home network 100. In some implementations,the smart alarm system 122 also includes one or more input devices orsensors (e.g., keypad, biometric scanner, NFC transceiver, microphone)for verifying the identity of a user, and one or more output devices(e.g., display, speaker). In some implementations, the smart alarmsystem 122 may also be set to an “armed” mode, such that detection of atrigger condition or event causes the alarm to be sounded unless adisarming action is performed.

In some implementations, the smart home environment 100 includes one ormore intelligent, multi-sensing, network-connected wall switches 108(hereinafter referred to as “smart wall switches 108”), along with oneor more intelligent, multi-sensing, network-connected wall pluginterfaces 110 (hereinafter referred to as “smart wall plugs 110”). Thesmart wall switches 108 may detect ambient lighting conditions, detectroom-occupancy states, and control a power and/or dim state of one ormore lights. In some instances, smart wall switches 108 may also controla power state or speed of a fan, such as a ceiling fan. The smart wallplugs 110 may detect occupancy of a room or enclosure and control supplyof power to one or more wall plugs (e.g., such that power is notsupplied to the plug if nobody is at home).

In some implementations, the smart home environment 100 of FIG. 1includes a plurality of intelligent, multi-sensing, network-connectedappliances 112 (hereinafter referred to as “smart appliances 112”), suchas refrigerators, stoves, ovens, televisions, washers, dryers, lights,stereos, intercom systems, garage-door openers, floor fans, ceilingfans, wall air conditioners, pool heaters, irrigation systems, securitysystems, space heaters, window AC units, motorized duct vents, and soforth. In some implementations, when plugged in, an appliance mayannounce itself to the smart home network, such as by indicating whattype of appliance it is, and it may automatically integrate with thecontrols of the smart home. Such communication by the appliance to thesmart home may be facilitated by either a wired or wirelesscommunication protocol. The smart home may also include a variety ofnon-communicating legacy appliances 140, such as old conventionalwasher/dryers, refrigerators, and the like, which may be controlled bysmart wall plugs 110. The smart home environment 100 may further includea variety of partially communicating legacy appliances 142, such asinfrared (“IR”) controlled wall air conditioners or other IR-controlleddevices, which may be controlled by IR signals provided by the smarthazard detectors 104 or the smart wall switches 108.

In some implementations, the smart home environment 100 includes one ormore network-connected cameras 118 that are configured to provide videomonitoring and security in the smart home environment 100. In someimplementations, cameras 118 also capture video when other conditions orhazards are detected, in order to provide visual monitoring of the smarthome environment 100 when those conditions or hazards occur. The cameras118 may be used to determine occupancy of the structure 150 and/orparticular rooms 152 in the structure 150, and thus may act as occupancysensors. For example, video captured by the cameras 118 may be processedto identify the presence of an occupant in the structure 150 (e.g., in aparticular room 152). Specific individuals may be identified based, forexample, on their appearance (e.g., height, face) and/or movement (e.g.,their walk/gait). For example, cameras 118 may additionally include oneor more sensors (e.g., IR sensors, motion detectors), input devices(e.g., microphone for capturing audio), and output devices (e.g.,speaker for outputting audio).

The smart home environment 100 may additionally or alternatively includeone or more other occupancy sensors (e.g., the smart doorbell 106, smartdoor locks 120, touch screens, IR sensors, microphones, ambient lightsensors, motion detectors, smart nightlights 170, etc.). In someimplementations, the smart home environment 100 includes radio-frequencyidentification (RFID) readers (e.g., in each room 152 or a portionthereof) that determine occupancy based on RFID tags located on orembedded in occupants. For example, RFID readers may be integrated intothe smart hazard detectors 104.

The smart home environment 100 may include one or more sound and/orvibration sensors for detecting abnormal sounds and/or vibrations. Thesesensors may be integrated with any of the devices described above. Thesound sensors detect sound above a decibel threshold. The vibrationsensors detect vibration above a threshold directed at a particular area(e.g., vibration on a particular window when a force is applied to breakthe window).

Conditions detected by the devices described above (e.g., motion, sound,vibrations, hazards) may be referred to collectively as alert events.

The smart home environment 100 may also include communication withdevices outside of the physical home but within a proximate geographicalrange of the home. For example, the smart home environment 100 mayinclude a pool heater monitor 114 that communicates a current pooltemperature to other devices within the smart home environment 100and/or receives commands for controlling the pool temperature.Similarly, the smart home environment 100 may include an irrigationmonitor 116 that communicates information regarding irrigation systemswithin the smart home environment 100 and/or receives controlinformation for controlling such irrigation systems.

By virtue of network connectivity, one or more of the smart home devicesof FIG. 1 may further allow a user to interact with the device even ifthe user is not proximate to the device. For example, a user maycommunicate with a device using a computer (e.g., a desktop computer,laptop computer, or tablet) or other portable electronic device 166(e.g., a mobile phone, such as a smart phone). A webpage or applicationmay be configured to receive communications from the user and controlthe device based on the communications and/or to present informationabout the device's operation to the user. For example, the user may viewa current set point temperature for a device (e.g., a stove) and adjustit using a computer. The user may be in the structure during this remotecommunication or outside the structure.

As discussed above, users may control smart devices in the smart homeenvironment 100 using a network-connected computer or portableelectronic device 166. In some examples, some or all of the occupants(e.g., individuals who live in the home) may register their device 166with the smart home environment 100. Such registration may be made at acentral server to authenticate the occupant and/or the device as beingassociated with the home and to give permission to the occupant to usethe device to control the smart devices in the home. An occupant may usetheir registered device 166 to remotely control the smart devices of thehome, such as when the occupant is at work or on vacation. The occupantmay also use their registered device to control the smart devices whenthe occupant is actually located inside the home, such as when theoccupant is sitting on a couch inside the home. It should be appreciatedthat instead of or in addition to registering devices 166, the smarthome environment 100 may make inferences about which individuals live inthe home and are therefore occupants and which devices 166 areassociated with those individuals. As such, the smart home environmentmay “learn” who is an occupant and permit the devices 166 associatedwith those individuals to control the smart devices of the home.

In some implementations, in addition to containing processing andsensing capabilities, devices 102, 104, 106, 108, 110, 112, 114, 116,118, 120, and/or 122 (collectively referred to as “the smart devices”)are capable of data communications and information sharing with othersmart devices, a central server or cloud-computing system, and/or otherdevices that are network-connected. Data communications may be carriedout using any of a variety of custom or standard wireless protocols(e.g., IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread, Z-Wave, BluetoothSmart, ISA100.11a, WirelessHART, MiWi, etc.) and/or any of a variety ofcustom or standard wired protocols (e.g., Ethernet, HomePlug, etc.), orany other suitable communication protocol, including communicationprotocols not yet developed as of the filing date of this document.

In some implementations, the smart devices serve as wireless or wiredrepeaters. In some implementations, a first one of the smart devicescommunicates with a second one of the smart devices via a wirelessrouter. The smart devices may further communicate with each other via aconnection (e.g., network interface 160) to a network, such as theInternet 162. Through the Internet 162, the smart devices maycommunicate with a smart home provider server system 164 (also called acentral server system and/or a cloud-computing system herein). The smarthome provider server system 164 may be associated with a manufacturer,support entity, or service provider associated with the smart device(s).In some implementations, a user is able to contact customer supportusing a smart device itself rather than needing to use othercommunication means, such as a telephone or Internet-connected computer.In some implementations, software updates are automatically sent fromthe smart home provider server system 164 to smart devices (e.g., whenavailable, when purchased, or at routine intervals).

In some implementations, the network interface 160 includes aconventional network device (e.g., a router), and the smart homeenvironment 100 of FIG. 1 includes a hub device 180 that iscommunicatively coupled to the network(s) 162 directly or via thenetwork interface 160. The hub device 180 is further communicativelycoupled to one or more of the above intelligent, multi-sensing,network-connected devices (e.g., smart devices of the smart homeenvironment 100). Each of these smart devices optionally communicateswith the hub device 180 using one or more radio communication networksavailable at least in the smart home environment 100 (e.g., ZigBee,Z-Wave, Insteon, Bluetooth, Wi-Fi and other radio communicationnetworks). In some implementations, the hub device 180 and devicescoupled with/to the hub device can be controlled and/or interacted withvia an application running on a smart phone, household controller,laptop, tablet computer, game console or similar electronic device. Insome implementations, a user of such controller application can viewstatus of the hub device or coupled smart devices, configure the hubdevice to interoperate with smart devices newly introduced to the homenetwork, commission new smart devices, and adjust or view settings ofconnected smart devices, etc. In some implementations the hub deviceextends capabilities of low capability smart device to matchcapabilities of the highly capable smart devices of the same type,integrates functionality of multiple different device types—even acrossdifferent communication protocols, and is configured to streamlineadding of new devices and commissioning of the hub device.

FIG. 2 is a block diagram illustrating an example network architecture200 that includes a smart home network 202 in accordance with someimplementations. In some implementations, the smart devices 204 in thesmart home environment 100 (e.g., devices 102, 104, 106, 108, 110, 112,114, 116, 118, 120, and/or 122) combine with the hub device 180 tocreate a mesh network in smart home network 202. In someimplementations, one or more smart devices 204 in the smart home network202 operate as a smart home controller. Additionally and/oralternatively, hub device 180 operates as the smart home controller. Insome implementations, a smart home controller has more computing powerthan other smart devices. In some implementations, a smart homecontroller processes inputs (e.g., from smart devices 204, electronicdevice 166, and/or smart home provider server system 164) and sendscommands (e.g., to smart devices 204 in the smart home network 202) tocontrol operation of the smart home environment 100. In someimplementations, some of the smart devices 204 in the smart home network202 (e.g., in the mesh network) are “spokesman” nodes (e.g., 204-1) andothers are “low-powered” nodes (e.g., 204-9). Some of the smart devicesin the smart home environment 100 are battery powered, while others havea regular and reliable power source, such as by connecting to wiring(e.g., to 120V line voltage wires) behind the walls 154 of the smarthome environment. The smart devices that have a regular and reliablepower source are referred to as “spokesman” nodes. These nodes aretypically equipped with the capability of using a wireless protocol tofacilitate bidirectional communication with a variety of other devicesin the smart home environment 100, as well as with the smart homeprovider server system 164. In some implementations, one or more“spokesman” nodes operate as a smart home controller. On the other hand,the devices that are battery powered are the “low-power” nodes. Thesenodes tend to be smaller than spokesman nodes and typically onlycommunicate using wireless protocols that require very little power,such as Zigbee, 6LoWPAN, etc.

In some implementations, some low-power nodes are incapable ofbidirectional communication. These low-power nodes send messages, butthey are unable to “listen”. Thus, other devices in the smart homeenvironment 100, such as the spokesman nodes, cannot send information tothese low-power nodes.

In some implementations, some low-power nodes are capable of only alimited bidirectional communication. For example, other devices are ableto communicate with the low-power nodes only during a certain timeperiod.

As described, in some implementations, the smart devices serve aslow-power and spokesman nodes to create a mesh network in the smart homeenvironment 100. In some implementations, individual low-power nodes inthe smart home environment regularly send out messages regarding whatthey are sensing, and the other low-powered nodes in the smart homeenvironment—in addition to sending out their own messages—forward themessages, thereby causing the messages to travel from node to node(i.e., device to device) throughout the smart home network 202. In someimplementations, the spokesman nodes in the smart home network 202,which are able to communicate using a relatively high-powercommunication protocol, such as IEEE 802.11, are able to switch to arelatively low-power communication protocol, such as IEEE 802.15.4, toreceive these messages, translate the messages to other communicationprotocols, and send the translated messages to other spokesman nodesand/or the smart home provider server system 164 (using, e.g., therelatively high-power communication protocol). Thus, the low-powerednodes using low-power communication protocols are able to send and/orreceive messages across the entire smart home network 202, as well asover the Internet 162 to the smart home provider server system 164. Insome implementations, the mesh network enables the smart home providerserver system 164 to regularly receive data from most or all of thesmart devices in the home, make inferences based on the data, facilitatestate synchronization across devices within and outside of the smarthome network 202, and send commands to one or more of the smart devicesto perform tasks in the smart home environment.

As described, the spokesman nodes and some of the low-powered nodes arecapable of “listening.” Accordingly, users, other devices, and/or thesmart home provider server system 164 may communicate control commandsto the low-powered nodes. For example, a user may use the electronicdevice 166 (e.g., a smart phone) to send commands over the Internet tothe smart home provider server system 164, which then relays thecommands to one or more spokesman nodes in the smart home network 202.The spokesman nodes may use a low-power protocol to communicate thecommands to the low-power nodes throughout the smart home network 202,as well as to other spokesman nodes that did not receive the commandsdirectly from the smart home provider server system 164.

In some implementations, a smart nightlight 170 (FIG. 1), which is anexample of a smart device 204, is a low-power node. In addition tohousing a light source, the smart nightlight 170 houses an occupancysensor, such as an ultrasonic or passive IR sensor, and an ambient lightsensor, such as a photo resistor or a single-pixel sensor that measureslight in the room. In some implementations, the smart nightlight 170 isconfigured to activate the light source when its ambient light sensordetects that the room is dark and when its occupancy sensor detects thatsomeone is in the room. In other implementations, the smart nightlight170 is simply configured to activate the light source when its ambientlight sensor detects that the room is dark. Further, in someimplementations, the smart nightlight 170 includes a low-power wirelesscommunication chip (e.g., a ZigBee chip) that regularly sends outmessages regarding the occupancy of the room and the amount of light inthe room, including instantaneous messages coincident with the occupancysensor detecting the presence of a person in the room. As mentionedabove, these messages may be sent wirelessly (e.g., using the meshnetwork) from node to node (i.e., smart device to smart device) withinthe smart home network 202 as well as over the Internet 162 to the smarthome provider server system 164.

Other examples of low-power nodes include battery-operated versions ofthe smart hazard detectors 104. These smart hazard detectors 104 areoften located in an area without access to constant and reliable powerand may include any number and type of sensors, such as smoke/fire/heatsensors (e.g., thermal radiation sensors), carbon monoxide/dioxidesensors, occupancy/motion sensors, ambient light sensors, ambienttemperature sensors, humidity sensors, and the like. Furthermore, smarthazard detectors 104 may send messages that correspond to each of therespective sensors to the other devices and/or the smart home providerserver system 164, such as by using the mesh network as described above.

Examples of spokesman nodes include smart doorbells 106, smartthermostats 102, smart wall switches 108, and smart wall plugs 110.These devices are often located near and connected to a reliable powersource, and therefore may include more power-consuming components, suchas one or more communication chips capable of bidirectionalcommunication in a variety of protocols.

In some implementations, the smart home environment 100 includes servicerobots 168 (FIG. 1) that are configured to carry out, in an autonomousmanner, any of a variety of household tasks.

As explained above with reference to FIG. 1, in some implementations,the smart home environment 100 of FIG. 1 includes a hub device 180 thatis communicatively coupled to the network(s) 162 directly or via thenetwork interface 160. The hub device 180 is further communicativelycoupled to one or more of the smart devices using a radio communicationnetwork that is available at least in the smart home environment 100.Communication protocols used by the radio communication network include,but are not limited to, ZigBee, Z-Wave, Insteon, EuOcean, Thread, OSIAN,Bluetooth Low Energy and the like. In some implementations, the hubdevice 180 not only converts the data received from each smart device tomeet the data format requirements of the network interface 160 or thenetwork(s) 162, but also converts information received from the networkinterface 160 or the network(s) 162 to meet the data format requirementsof the respective communication protocol associated with a targetedsmart device. In some implementations, in addition to data formatconversion, the hub device 180 further processes the data received fromthe smart devices or information received from the network interface 160or the network(s) 162 preliminary. For example, the hub device 180 canintegrate inputs from multiple sensors/connected devices (includingsensors/devices of the same and/or different types), perform higherlevel processing on those inputs—e.g., to assess the overall environmentand coordinate operation among the different sensors/devices—and/orprovide instructions to the different devices based on the collection ofinputs and programmed processing. It is also noted that in someimplementations, the network interface 160 and the hub device 180 areintegrated to one network device. Functionality described herein isrepresentative of particular implementations of smart devices, controlapplication(s) running on representative electronic device(s) (such as asmart phone), hub device(s) 180, and server(s) coupled to hub device(s)via the Internet or other Wide Area Network. All or a portion of thisfunctionality and associated operations can be performed by any elementsof the described system—for example, all or a portion of thefunctionality described herein as being performed by an implementationof the hub device can be performed, in different system implementations,in whole or in part on the server, one or more connected smart devicesand/or the control application, or different combinations thereof.

FIG. 3 illustrates a network-level view of an extensible devices andservices platform with which the smart home environment of FIG. 1 isintegrated, in accordance with some implementations. The extensibledevices and services platform 300 includes smart home provider serversystem 164. Each of the intelligent, network-connected devices describedwith reference to FIG. 1 (e.g., 102, 104, 106, 108, 110, 112, 114, 116and 118, identified simply as “devices” in FIGS. 2-4) may communicatewith the smart home provider server system 164. For example, aconnection to the Internet 162 may be established either directly (forexample, using 3G/4G connectivity to a wireless carrier), or through anetwork interface 160 (e.g., a router, switch, gateway, hub device, oran intelligent, dedicated whole-home controller node), or through anycombination thereof.

In some implementations, the devices and services platform 300communicates with and collects data from the smart devices of the smarthome environment 100. In addition, in some implementations, the devicesand services platform 300 communicates with and collects data from aplurality of smart home environments across the world. For example, thesmart home provider server system 164 collects home data 302 from thedevices of one or more smart home environments 100, where the devicesmay routinely transmit home data or may transmit home data in specificinstances (e.g., when a device queries the home data 302). Examplecollected home data 302 includes, without limitation, power consumptiondata, blackbody radiation data, occupancy data, HVAC settings and usagedata, carbon monoxide levels data, carbon dioxide levels data, volatileorganic compounds levels data, sleeping schedule data, cooking scheduledata, inside and outside temperature humidity data, televisionviewership data, inside and outside noise level data, pressure data,video data, etc.

In some implementations, the smart home provider server system 164provides one or more services 304 to smart homes and/or third parties.Example services 304 include, without limitation, software updates,customer support, sensor data collection/logging, remote access, remoteor distributed control, and/or use suggestions (e.g., based on collectedhome data 302) to improve performance, reduce utility cost, increasesafety, etc. In some implementations, data associated with the services304 is stored at the smart home provider server system 164, and thesmart home provider server system 164 retrieves and transmits the dataat appropriate times (e.g., at regular intervals, upon receiving arequest from a user, etc.).

In some implementations, the extensible devices and services platform300 includes a processing engine 306, which may be concentrated at asingle server or distributed among several different computing entitieswithout limitation. In some implementations, the processing engine 306includes engines configured to receive data from the devices of smarthome environments 100 (e.g., via the Internet 162 and/or a networkinterface 160), to index the data, to analyze the data and/or togenerate statistics based on the analysis or as part of the analysis. Insome implementations, the analyzed data is stored as derived home data308.

Results of the analysis or statistics may thereafter be transmitted backto the device that provided home data used to derive the results, toother devices, to a server providing a webpage to a user of the device,or to other non-smart device entities. In some implementations, usagestatistics, usage statistics relative to use of other devices, usagepatterns, and/or statistics summarizing sensor readings are generated bythe processing engine 306 and transmitted. The results or statistics maybe provided via the Internet 162. In this manner, the processing engine306 may be configured and programmed to derive a variety of usefulinformation from the home data 302. A single server may include one ormore processing engines.

The derived home data 308 may be used at different granularities for avariety of useful purposes, ranging from explicit programmed control ofthe devices on a per-home, per-neighborhood, or per-region basis (forexample, demand-response programs for electrical utilities), to thegeneration of inferential abstractions that may assist on a per-homebasis (for example, an inference may be drawn that the homeowner hasleft for vacation and so security detection equipment may be put onheightened sensitivity), to the generation of statistics and associatedinferential abstractions that may be used for government or charitablepurposes. For example, processing engine 306 may generate statisticsabout device usage across a population of devices and send thestatistics to device users, service providers or other entities (e.g.,entities that have requested the statistics and/or entities that haveprovided monetary compensation for the statistics).

In some implementations, to encourage innovation and research and toincrease products and services available to users, the devices andservices platform 300 exposes a range of application programminginterfaces (APIs) 310 to third parties, such as charities 314,governmental entities 316 (e.g., the Food and Drug Administration or theEnvironmental Protection Agency), academic institutions 318 (e.g.,university researchers), businesses 320 (e.g., providing devicewarranties or service to related equipment, targeting advertisementsbased on home data), utility companies 324, and other third parties. TheAPIs 310 are coupled to and permit third-party systems to communicatewith the smart home provider server system 164, including the services304, the processing engine 306, the home data 302, and the derived homedata 308. In some implementations, the APIs 310 allow applicationsexecuted by the third parties to initiate specific data processing tasksthat are executed by the smart home provider server system 164, as wellas to receive dynamic updates to the home data 302 and the derived homedata 308.

For example, third parties may develop programs and/or applications(e.g., web applications or mobile applications) that integrate with thesmart home provider server system 164 to provide services andinformation to users. Such programs and applications may be, forexample, designed to help users reduce energy consumption, topreemptively service faulty equipment, to prepare for high servicedemands, to track past service performance, etc., and/or to performother beneficial functions or tasks.

FIG. 4 illustrates an abstracted functional view 400 of the extensibledevices and services platform 300 of FIG. 3, with reference to aprocessing engine 306 as well as devices of the smart home environment,in accordance with some implementations. Even though devices situated insmart home environments will have a wide variety of different individualcapabilities and limitations, the devices may be thought of as sharingcommon characteristics in that each device is a data consumer 402 (DC),a data source 404 (DS), a services consumer 406 (SC), and a servicessource 408 (SS). Advantageously, in addition to providing controlinformation used by the devices to achieve their local and immediateobjectives, the extensible devices and services platform 300 may also beconfigured to use the large amount of data that is generated by thesedevices. In addition to enhancing or optimizing the actual operation ofthe devices themselves with respect to their immediate functions, theextensible devices and services platform 300 may be directed to“repurpose” that data in a variety of automated, extensible, flexible,and/or scalable ways to achieve a variety of useful objectives. Theseobjectives may be predefined or adaptively identified based on, e.g.,usage patterns, device efficiency, and/or user input (e.g., requestingspecific functionality).

FIG. 4 shows processing engine 306 as including a number of processingparadigms 410. In some implementations, processing engine 306 includes amanaged services paradigm 410 a that monitors and manages primary orsecondary device functions. The device functions may include ensuringproper operation of a device given user inputs, estimating that (e.g.,and responding to an instance in which) an intruder is or is attemptingto be in a dwelling, detecting a failure of equipment coupled to thedevice (e.g., a light bulb having burned out), implementing or otherwiseresponding to energy demand response events, providing a heat-sourcealert, and/or alerting a user of a current or predicted future event orcharacteristic. In some implementations, processing engine 306 includesan advertising/communication paradigm 410 b that estimatescharacteristics (e.g., demographic information), desires and/or productsof interest of a user based on device usage. Services, promotions,products or upgrades may then be offered or automatically provided tothe user. In some implementations, processing engine 306 includes asocial paradigm 410 c that uses information from a social network,provides information to a social network (for example, based on deviceusage), and/or processes data associated with user and/or deviceinteractions with the social network platform. For example, a user'sstatus as reported to their trusted contacts on the social network maybe updated to indicate when the user is home based on light detection,security system inactivation or device usage detectors. As anotherexample, a user may be able to share device-usage statistics with otherusers. In yet another example, a user may share HVAC settings thatresult in low power bills and other users may download the HVAC settingsto their smart thermostat 102 to reduce their power bills.

In some implementations, processing engine 306 includes achallenges/rules/compliance/rewards paradigm 410 d that informs a userof challenges, competitions, rules, compliance regulations and/orrewards and/or that uses operation data to determine whether a challengehas been met, a rule or regulation has been complied with and/or areward has been earned. The challenges, rules, and/or regulations mayrelate to efforts to conserve energy, to live safely (e.g., reducing theoccurrence of heat-source alerts) (e.g., reducing exposure to toxins orcarcinogens), to conserve money and/or equipment life, to improvehealth, etc. For example, one challenge may involve participants turningdown their thermostat by one degree for one week. Those participantsthat successfully complete the challenge are rewarded, such as withcoupons, virtual currency, status, etc. Regarding compliance, an exampleinvolves a rental-property owner making a rule that no renters arepermitted to access certain owner's rooms. The devices in the roomhaving occupancy sensors may send updates to the owner when the room isaccessed.

In some implementations, processing engine 306 integrates or otherwiseuses extrinsic information 412 from extrinsic sources to improve thefunctioning of one or more processing paradigms. Extrinsic information412 may be used to interpret data received from a device, to determine acharacteristic of the environment near the device (e.g., outside astructure that the device is enclosed in), to determine services orproducts available to the user, to identify a social network orsocial-network information, to determine contact information of entities(e.g., public-service entities such as an emergency-response team, thepolice or a hospital) near the device, to identify statistical orenvironmental conditions, trends or other information associated with ahome or neighborhood, and so forth.

FIG. 5A illustrates a representative operating environment 500 in whicha hub device server system 508 provides data processing for monitoringand facilitating review of alert events (e.g., motion events) in videostreams captured by video cameras 118. As shown in FIG. 5A, the hubdevice server system 508 receives video data from video sources 522(including cameras 118) located at various physical locations (e.g.,inside homes, restaurants, stores, streets, parking lots, and/or thesmart home environments 100 of FIG. 1). Each video source 522 may bebound to one or more user (e.g., reviewer) accounts, and the hub deviceserver system 508 provides video monitoring data for the video source522 to client devices 504 associated with the reviewer accounts. Forexample, the portable electronic device 166 is an example of the clientdevice 504.

In some implementations, the smart home provider server system 164 or acomponent thereof serves as the hub device server system 508; the hubdevice server system 508 is a part or component of the smart homeprovider server system 164. In some implementations, the hub deviceserver system 508 is a dedicated video processing server that providesvideo processing services to video sources and client devices 504independent of other services provided by the hub device server system508. An example of a video processing server is described below withreference to FIG. 5B.

In some implementations, each of the video sources 522 includes one ormore video cameras 118 that capture video and send the captured video tothe hub device server system 508 substantially in real-time. In someimplementations, each of the video sources 522 optionally includes acontroller device (not shown) that serves as an intermediary between theone or more cameras 118 and the hub device server system 508. Thecontroller device receives the video data from the one or more cameras118, optionally performs some preliminary processing on the video data,and sends the video data to the hub device server system 508 on behalfof the one or more cameras 118 substantially in real-time. In someimplementations, each camera has its own on-board processingcapabilities to perform some preliminary processing on the capturedvideo data before sending the processed video data (along with metadataobtained through the preliminary processing) to the controller deviceand/or the hub device server system 508.

In some implementations, a camera 118 of a video source 522 capturesvideo at a first resolution (e.g., 720P and/or 1080P) and/or a firstframe rate (24 frames per second), and sends the captured video to thehub device server system 508 at both the first resolution (e.g., theoriginal capture resolution(s), the high-quality resolution(s) such as1080P and/or 720P) and the first frame rate, and at a second, differentresolution (e.g., 180P) and/or a second frame rate (e.g., 5 frames persecond or 10 frames per second). For example, the camera 118 captures avideo 523-1 at 720P and/or 1080P resolution (the camera 118 may capturea video at 1080P and create a downscaled 720P version, or capture atboth 720P and 1080P). The video source 522 creates a second (or third),rescaled (and optionally at a different frame rate than the version523-1) version 525-1 of the captured video at 180P resolution, andtransmits both the original captured version 523-1 (i.e., 1080P and/or720P) and the rescaled version 525-1 (i.e., the 180P version) to the hubdevice server system 508 for storage. In some implementations, therescaled version has a lower resolution, and optionally a lower framerate, than the original captured video. The hub device server system 508transmits the original captured version or the rescaled version to aclient 504, depending on the context. For example, the hub device serversystem 508 transmits the rescaled version when transmitting multiplevideos to the same client device 504 for concurrent monitoring by theuser, and transmits the original captured version in other contexts. Insome implementations, the hub device server system 508 downscales theoriginal captured version to a lower resolution, and transmits thedownscaled version.

In some other implementations, a camera 118 of a video source 522captures video at a first resolution (e.g., 720P and/or 1080P) and/or afirst frame rate, and sends the captured video to the hub device serversystem 508 at the first resolution (e.g., the original captureresolution(s); the high-quality resolution(s) such as 1080P and/or 720P)and first frame rate for storage. When the hub device server system 508transmits the video to a client device, the hub device server system 508may downscale the video to a second, lower resolution (e.g., 180P)and/or second, lower frame rate for the transmission, depending on thecontext. For example, the hub device server system 508 transmits thedownscaled version when transmitting multiple videos to the same clientdevice 504 for concurrent monitoring by the user, and transmits theoriginal captured version in other contexts. In some implementations,the camera 118 operates in two modes, a Day mode in which there isenough ambient light to capture color video of a scene, and a Night modein which the camera captures video of a scene using onboard LEDillumination when there is not enough ambient light (e.g., as describedin the cross-referenced U.S. patent application Ser. No. 14/723,276,filed on May 27, 2015, entitled, “Multi-mode LED Illumination System.”).As described herein, in some implementations, the camera 118 includes aprogram module that decides when to switch from Night mode to Day modeusing one or more of: illuminant detection (detecting the type ofambient light based on R/G and B/G component ratios of the ambientlight), lux detection (detecting the ambient light level), and tiling(performing illuminant detection and/or lux detection for sub-regions ofan image sensor array so as to detect localized/point light source thatonly impact a portion of the image sensor array).

As shown in FIG. 5A, in accordance with some implementations, each ofthe client devices 504 includes a client-side module 502. Theclient-side module 502 communicates with a server-side module 506executed on the hub device server system 508 through the one or morenetworks 162. The client-side module 502 provides client-sidefunctionalities for the event monitoring and review processing andcommunications with the server-side module 506. The server-side module506 provides server-side functionalities for event monitoring and reviewprocessing for any number of client-side modules 502 each residing on arespective client device 504. The server-side module 506 also providesserver-side functionalities for video processing and camera control forany number of the video sources 522, including any number of controldevices and the cameras 118.

In some implementations, the server-side module 506 includes one or moreprocessors 512, a video storage database 514, device and accountdatabases 516, an I/O interface to one or more client devices 518, andan I/O interface to one or more video sources 520. The I/O interface toone or more clients 518 facilitates the client-facing input and outputprocessing for the server-side module 506. In some implementations, theI/O interface to clients 518 or a transcoding proxy computer (not shown)rescales (e.g., downscales) and/or changes the frame rate of video fortransmission to a client 504. The databases 516 store a plurality ofprofiles for reviewer accounts registered with the video processingserver, where a respective user profile includes account credentials fora respective reviewer account, and one or more video sources linked tothe respective reviewer account. The I/O interface to one or more videosources 520 facilitates communications with one or more video sources522 (e.g., groups of one or more cameras 118 and associated controllerdevices). The video storage database 514 stores raw video data receivedfrom the video sources 522, as well as various types of metadata, suchas motion events, event categories, event category models, eventfilters, and event masks, for use in data processing for eventmonitoring and review for each reviewer account.

In some implementations, the server-side module 506 receives informationregarding alert events detected by other smart devices 204 (e.g.,hazards, sound, vibration, motion). In accordance with the alert eventinformation, the server-side module 506 instructs one or more videosources 522 in the smart home environment 100 where the alert event isdetected to capture video and/or associate with the alert event video,received from the video sources 522 in the same smart home environment100, that is contemporaneous or proximate in time with the alert event.

Examples of a representative client device 504 include, but are notlimited to, a handheld computer, a wearable computing device, a personaldigital assistant (PDA), a tablet computer, a laptop computer, a desktopcomputer, a cellular telephone, a smart phone, an enhanced generalpacket radio service (EGPRS) mobile phone, a media player, a navigationdevice, a game console, a television, a remote control, a point-of-sale(POS) terminal, vehicle-mounted computer, an ebook reader, or acombination of any two or more of these data processing devices or otherdata processing devices. For example, client devices 504-1, 504-2, and504-m are a smart phone, a tablet computer, and a laptop computer,respectively.

Examples of the one or more networks 162 include local area networks(LAN) and wide area networks (WAN) such as the Internet. The one or morenetworks 162 are, optionally, implemented using any known networkprotocol, including various wired or wireless protocols, such asEthernet, Universal Serial Bus (USB), FIREWIRE, Long Term Evolution(LTE), Global System for Mobile Communications (GSM), Enhanced Data GSMEnvironment (EDGE), code division multiple access (CDMA), time divisionmultiple access (TDMA), Bluetooth, Wi-Fi, voice over Internet Protocol(VoIP), Wi-MAX, or any other suitable communication protocol.

In some implementations, the hub device server system 508 is implementedon one or more standalone data processing apparatuses or a distributednetwork of computers. In some implementations, the hub device serversystem 508 also employs various virtual devices and/or services of thirdparty service providers (e.g., third-party cloud service providers) toprovide the underlying computing resources and/or infrastructureresources of the hub device server system 508. In some implementations,the hub device server system 508 includes, but is not limited to, ahandheld computer, a tablet computer, a laptop computer, a desktopcomputer, or a combination of any two or more of these data processingdevices or other data processing devices.

The server-client environment 500 shown in FIG. 5A includes both aclient-side portion (e.g., the client-side module 502) and a server-sideportion (e.g., the server-side module 506). The division offunctionalities between the client and server portions of operatingenvironment 500 can vary in different implementations. Similarly, thedivision of functionalities between the video source 522 and the hubdevice server system 508 can vary in different implementations. Forexample, in some implementations, client-side module 502 is athin-client that provides only user-facing input and output processingfunctions, and delegates all other data processing functionalities to abackend server (e.g., the hub device server system 508). Similarly, insome implementations, a respective one of the video sources 522 is asimple video capturing device that continuously captures and streamsvideo data to the hub device server system 508 with no or limited localpreliminary processing on the video data. Although many aspects of thepresent technology are described from the perspective of the hub deviceserver system 508, the corresponding actions performed by the clientdevice 504 and/or the video sources 522 would be apparent to onesskilled in the art without any creative efforts. Similarly, some aspectsof the present technology may be described from the perspective of theclient device or the video source, and the corresponding actionsperformed by the video server would be apparent to ones skilled in theart without any creative efforts. Furthermore, some aspects of thepresent technology may be performed by the hub device server system 508,the client device 504, and the video sources 522 cooperatively.

It should be understood that operating environment 500 that involves thehub device server system 508, the video sources 522 and the videocameras 118 is merely an example. Many aspects of operating environment500 are generally applicable in other operating environments in which aserver system provides data processing for monitoring and facilitatingreview of data captured by other types of electronic devices (e.g.,smart thermostats 102, smart hazard detectors 104, smart doorbells 106,smart wall plugs 110, appliances 112 and the like).

The electronic devices, the client devices or the server systemcommunicate with each other using the one or more communication networks162. In an example smart home environment, two or more devices (e.g.,the network interface device 160, the hub device 180, and the clientdevices 504-m) are located in close proximity to each other, such thatthey could be communicatively coupled in the same sub-network 162A viawired connections, a WLAN or a Bluetooth Personal Area Network (PAN).The Bluetooth PAN is optionally established based on classical Bluetoothtechnology or Bluetooth Low Energy (BLE) technology. This smart homeenvironment further includes one or more other radio communicationnetworks 162B through which at least some of the electronic devices ofthe video sources 522-n exchange data with the hub device 180.Alternatively, in some situations, some of the electronic devices of thevideo sources 522-n communicate with the network interface device 160directly via the same sub-network 162A that couples devices 160, 180 and504-m. In some implementations (e.g., in the network 162C), both theclient device 504-m and the electronic devices of the video sources522-n communicate directly via the network(s) 162 without passing thenetwork interface device 160 or the hub device 180.

In some implementations, during normal operation, the network interfacedevice 160 and the hub device 180 communicate with each other to form anetwork gateway through which data are exchanged with the electronicdevice of the video sources 522-n. As explained above, the networkinterface device 160 and the hub device 180 optionally communicate witheach other via a sub-network 162A.

In some implementations, the hub device 180 is omitted, and thefunctionality of the hub device 180 is performed by the hub deviceserver system 508, video server system 552, or smart home providerserver system 164.

In some implementations, the hub device server system 508 is, orincludes, a dedicated video processing server. FIG. 5B illustrates arepresentative operating environment 550 in which a video server system552 serves as a dedicated video processing server and provides dataprocessing for monitoring and facilitating review of alert events (e.g.,motion events) in video streams captured by video cameras 118. As shownin FIG. 5B, the video server system 552 receives video data from videosources 522 (including cameras 118) located at various physicallocations (e.g., inside homes, restaurants, stores, streets, parkinglots, and/or the smart home environments 100 of FIG. 1). Each videosource 522 may be bound to one or more user (e.g., reviewer) accounts,and the video server system 552 provides video monitoring data for thevideo source 522 to client devices 504 associated with the revieweraccounts. For example, the portable electronic device 166 is an exampleof the client device 504.

In some implementations, the smart home provider server system 164 or acomponent thereof serves as the video server system 552; the videoserver system 552 is a part or component of the smart home providerserver system 164. In some implementations, the video server system 552is separate from the smart home provider server system 164, and providesvideo processing services to video sources 522 and client devices 504independent of other services provided by the smart home provider serversystem 164. In some implementations, the smart home provider serversystem 164 and the video server system 552 are separate but communicateinformation with each other to provide functionality to users. Forexample, a detection of a hazard may be communicated by the smart homeprovider server system 164 to the video server system 552, and the videoserver system 552, in accordance with the communication regarding thedetection of the hazard, records, processes, and/or provides videoassociated with the detected hazard.

In some implementations, each of the video sources 522 includes one ormore video cameras 118 that capture video and send the captured video tothe video server system 552 substantially in real-time. In someimplementations, each of the video sources 522 optionally includes acontroller device (not shown) that serves as an intermediary between theone or more cameras 118 and the video server system 552. The controllerdevice receives the video data from the one or more cameras 118,optionally, performs some preliminary processing on the video data, andsends the video data to the video server system 552 on behalf of the oneor more cameras 118 substantially in real-time. In some implementations,each camera has its own on-board processing capabilities to perform somepreliminary processing on the captured video data before sending theprocessed video data (along with metadata obtained through thepreliminary processing) to the controller device and/or the video serversystem 552.

In some implementations, a camera 118 of a video source 522 capturesvideo at a first resolution (e.g., 720P and/or 1080P) and/or a firstframe rate (24 frames per second), and sends the captured video to thevideo server system 552 at both the first resolution (e.g., the originalcapture resolution(s), the high-quality resolution(s)) and the firstframe rate, and a second, different resolution (e.g., 180P) and/or asecond frame rate (e.g., 5 frames per second or 10 frames per second).For example, the camera 118 captures a video 523-1 at 720P and/or 1080Presolution (the camera 118 may capture a video at 1080P and create adownscaled 720P version, or capture at both 720P and 1080P). The videosource 522 creates a second (or third), rescaled (and optionally at adifferent frame rate than the version 523-1) version 525-1 of thecaptured video at 180P resolution, and transmits both the originalcaptured version 523-1 (i.e., 1080P and/or 720P) and the rescaledversion 525-1 (i.e., the 180P version) to the video server system 552for storage. In some implementations, the rescaled version has a lowerresolution, and optionally a lower frame rate, than the originalcaptured video. The video server system 552 transmits the originalcaptured version or the rescaled version to a client 504, depending onthe context. For example, the video server system 552 transmits therescaled version when transmitting multiple videos to the same clientdevice 504 for concurrent monitoring by the user, and transmits theoriginal captured version in other contexts. In some implementations,the video server system 552 downscales the original captured version toa lower resolution, and transmits the downscaled version.

In some other implementations, a camera 118 of a video source 522captures video at a first resolution (e.g., 720P and/or 1080P)) and/or afirst frame rate, and sends the captured video to the video serversystem 552 at the first resolution (e.g., the original captureresolution(s), the high-quality resolution(s) such as 1080P and/or 720P)and the first fame rate for storage. When the video server system 552transmits the video to a client device, the video server system 552 maydownscale the video to a second, lower resolution (e.g., 180P) and/orsecond, lower frame rate for the transmission, depending on the context.For example, the video server system 552 transmits the downscaledversion when transmitting multiple videos to the same client device 504for concurrent monitoring by the user, and transmits the originalcaptured version in other contexts.

As shown in FIG. 5B, in accordance with some implementations, each ofthe client devices 504 includes a client-side module 502. Theclient-side module 502 communicates with the video server system 552through the one or more networks 162. In some implementations, the videoserver system 552 includes a video server 552, a client interface server556, and a camera interface server 558. In some implementations, thevideo server 552 includes the server-side module 506 and its componentsand modules (FIG. 5A) or one or more respective components and/ormodules of the server-side module 506. The client-side module 502provides client-side functionalities for the event monitoring and reviewprocessing and communications with the video server system 552. Thevideo server system 552 provides server-side functionalities for eventmonitoring and review processing for any number of client-side modules502 each residing on a respective client device 504. The video serversystem 556 also provides server-side functionalities for videoprocessing and camera control for any number of the video sources 522,including any number of control devices and the cameras 118.

In some implementations, the video server 554 includes one or moreprocessors 512, a video storage database 514, and device and accountdatabases 516. In some implementations, the video server system 552 alsoincludes a client interface server 556 and a camera interface server558. The client interface server 556 provides an I/O interface to one ormore client devices 504, and the camera interface server 558 provides anI/O interface to one or more video sources 520. The client interfaceserver 556 facilitates the client-facing input and output processing forthe video server system 552. For example, the client interface server556 generates web pages for reviewing and monitoring video captured bythe video sources 522 in a web browser application at a client 504. Insome implementations, the client interface server 556 or a transcodingproxy computer rescales (e.g., downscales) and/or changes the frame rateof video for transmission to a client 504. In some implementations, theclient interface server 504 also serves as the transcoding proxy. Thedatabases 516 store a plurality of profiles for reviewer accountsregistered with the video processing server, where a respective userprofile includes account credentials for a respective reviewer account,and one or more video sources linked to the respective reviewer account.The camera interface server 558 facilitates communications with one ormore video sources 522 (e.g., groups of one or more cameras 118 andassociated controller devices). The video storage database 514 storesraw video data received from the video sources 522, as well as varioustypes of metadata, such as motion events, event categories, eventcategory models, event filters, event masks, alert events, and camerahistories, for use in data processing for event monitoring and reviewfor each reviewer account.

In some implementations, the video server system 552 receivesinformation regarding alert events detected by other smart devices 204(e.g., hazards, sound, vibration, motion. In accordance with the alertevent information, the video server system 552 instructs one or morevideo sources 522 in the smart home environment 100 where the alertevent is detected to capture video and/or associate with the alert eventvideo, received from the video sources 522 in the same smart homeenvironment 100, that is contemporaneous or proximate in time with thealert event.

Examples of a representative client device 504 include, but are notlimited to, a handheld computer, a wearable computing device, a personaldigital assistant (PDA), a tablet computer, a laptop computer, a desktopcomputer, a cellular telephone, a smart phone, an enhanced generalpacket radio service (EGPRS) mobile phone, a media player, a navigationdevice, a game console, a television, a remote control, a point-of-sale(POS) terminal, vehicle-mounted computer, an ebook reader, or acombination of any two or more of these data processing devices or otherdata processing devices. For example, client devices 504-1, 504-2, and504-m are a smart phone, a tablet computer, and a laptop computer,respectively.

Examples of the one or more networks 162 include local area networks(LAN) and wide area networks (WAN) such as the Internet. The one or morenetworks 162 are, optionally, implemented using any known networkprotocol, including various wired or wireless protocols, such asEthernet, Universal Serial Bus (USB), FIREWIRE, Long Term Evolution(LTE), Global System for Mobile Communications (GSM), Enhanced Data GSMEnvironment (EDGE), code division multiple access (CDMA), time divisionmultiple access (TDMA), Bluetooth, Wi-Fi, voice over Internet Protocol(VoIP), Wi-MAX, or any other suitable communication protocol.

In some implementations, the video server system 552 is implemented onone or more standalone data processing apparatuses or a distributednetwork of computers. In some implementations, the video server 554, theclient interface server 556, and the camera interface server 558 areeach respectively implemented on one or more standalone data processingapparatuses or a distributed network of computers. In someimplementations, the video server system 552 also employs variousvirtual devices and/or services of third party service providers (e.g.,third-party cloud service providers) to provide the underlying computingresources and/or infrastructure resources of the video server system552. In some implementations, the video server system 552 includes, butis not limited to, a handheld computer, a tablet computer, a laptopcomputer, a desktop computer, or a combination of any two or more ofthese data processing devices or other data processing devices.

The server-client environment 550 shown in FIG. 5B includes both aclient-side portion (e.g., the client-side module 502) and a server-sideportion (e.g., the components and modules in the video server system552). The division of functionalities between the client and serverportions of operating environment 550 can vary in differentimplementations. Similarly, the division of functionalities between thevideo source 522 and the video server system 552 can vary in differentimplementations. For example, in some implementations, client-sidemodule 502 is a thin-client that provides only user-facing input andoutput processing functions, and delegates all other data processingfunctionalities to a backend server (e.g., the video server system 552).Similarly, in some implementations, a respective one of the videosources 522 is a simple video capturing device that continuouslycaptures and streams video data to the video server system 552 with noor limited local preliminary processing on the video data. Although manyaspects of the present technology are described from the perspective ofthe video server system 552, the corresponding actions performed by theclient device 504 and/or the video sources 522 would be apparent to onesskilled in the art without any creative efforts. Similarly, some aspectsof the present technology may be described from the perspective of theclient device or the video source, and the corresponding actionsperformed by the video server would be apparent to ones skilled in theart without any creative efforts. Furthermore, some aspects of thepresent technology may be performed by the video server system 552, theclient device 504, and the video sources 522 cooperatively.

It should be understood that operating environment 550 that involves thevideo server system 552, the video sources 522 and the video cameras 118is merely an example. Many aspects of operating environment 550 aregenerally applicable in other operating environments in which a serversystem provides data processing for monitoring and facilitating reviewof data captured by other types of electronic devices (e.g., smartthermostats 102, smart hazard detectors 104, smart doorbells 106, smartwall plugs 110, appliances 112 and the like).

The electronic devices, the client devices or the server systemcommunicate with each other using the one or more communication networks162. In an example smart home environment, two or more devices (e.g.,the network interface device 160, the hub device 180, and the clientdevices 504-m) are located in close proximity to each other, such thatthey could be communicatively coupled in the same sub-network 162A viawired connections, a WLAN or a Bluetooth Personal Area Network (PAN).The Bluetooth PAN is optionally established based on classical Bluetoothtechnology or Bluetooth Low Energy (BLE) technology. This smart homeenvironment further includes one or more other radio communicationnetworks 162B through which at least some of the electronic devices ofthe video sources 522-n exchange data with the hub device 180.Alternatively, in some situations, some of the electronic devices of thevideo sources 522-n communicate with the network interface device 160directly via the same sub-network 162A that couples devices 160, 180 and504-m. In some implementations (e.g., in the network 162C), both theclient device 504-m and the electronic devices of the video sources522-n communicate directly via the network(s) 162 without passing thenetwork interface device 160 or the hub device 180.

In some implementations, during normal operation, the network interfacedevice 160 and the hub device 180 communicate with each other to form anetwork gateway through which data are exchanged with the electronicdevice of the video sources 522-n. As explained above, the networkinterface device 160 and the hub device 180 optionally communicate witheach other via a sub-network 162A.

In some implementations, a video source 522 may be private (e.g., itscaptured videos and history are accessible only to the associateduser/account), public (e.g., its captured videos and history areaccessible by anyone), or shared (e.g., its captured videos and historyare accessible only to the associated user/account and other specificusers/accounts with whom the associated user has authorized access(e.g., by sharing with the other specific users)). Whether a videosource 522 is private, public, or shared is configurable by theassociated user.

In some implementations, the camera 118 also performs preliminary motiondetection on video captured by the camera 118. For example, the camera118 analyzes the captured video for significant changes in pixels. Whenmotion is detected by the preliminary motion detection, the camera 118transmits information to the hub device server system 508 or videoserver system 552 informing the server system of the preliminarydetected motion. The hub device server system 508 or video server system552, in accordance with the information of the detected motion, mayactivate sending of a motion detection notification to a client device504, log the preliminary detected motion as an alert event, and/orperform additional analysis of the captured video to confirm and/orclassify the preliminary detected motion.

FIG. 6 is a block diagram illustrating a representative hub device 180in accordance with some implementations. In some implementations, thehub device 180 includes one or more processing units (e.g., CPUs, ASICs,FPGAs, microprocessors, and the like) 602, one or more communicationinterfaces 604, memory 606, radios 640, and one or more communicationbuses 608 for interconnecting these components (sometimes called achipset). In some implementations, the hub device 180 includes one ormore input devices 610 such as one or more buttons for receiving input.In some implementations, the hub device 180 includes one or more outputdevices 612 such as one or more indicator lights, a sound card, aspeaker, a small display for displaying textual information and errorcodes, etc. Furthermore, in some implementations, the hub device 180uses a microphone and voice recognition or a camera and gesturerecognition to supplement or replace the keyboard. In someimplementations, the hub device 180 includes a location detection device614, such as a GPS (global positioning satellite) or other geo-locationreceiver, for determining the location of the hub device 180.

The hub device 180 optionally includes one or more built-in sensors (notshown), including, for example, one or more thermal radiation sensors,ambient temperature sensors, humidity sensors, IR sensors, occupancysensors (e.g., using RFID sensors), ambient light sensors, motiondetectors, accelerometers, and/or gyroscopes.

The radios 640 enables one or more radio communication networks in thesmart home environments, and allows a hub device to communicate withsmart devices. In some implementations, the radios 640 are capable ofdata communications using any of a variety of custom or standardwireless protocols (e.g., IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread,Z-Wave, Bluetooth Smart, ISA100.11a, WirelessHART, MiWi, etc.) custom orstandard wired protocols (e.g., Ethernet, HomePlug, etc.), and/or anyother suitable communication protocol, including communication protocolsnot yet developed as of the filing date of this document.

Communication interfaces 604 include, for example, hardware capable ofdata communications using any of a variety of custom or standardwireless protocols (e.g., IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread,Z-Wave, Bluetooth Smart, ISA100.11a, WirelessHART, MiWi, etc.) and/orany of a variety of custom or standard wired protocols (e.g., Ethernet,HomePlug, etc.), or any other suitable communication protocol, includingcommunication protocols not yet developed as of the filing date of thisdocument.

Memory 606 includes high-speed random access memory, such as DRAM, SRAM,DDR RAM, or other random access solid state memory devices; and,optionally, includes non-volatile memory, such as one or more magneticdisk storage devices, one or more optical disk storage devices, one ormore flash memory devices, or one or more other non-volatile solid statestorage devices. Memory 606, or alternatively the non-volatile memorywithin memory 606, includes a non-transitory computer readable storagemedium. In some implementations, memory 606, or the non-transitorycomputer readable storage medium of memory 606, stores the followingprograms, modules, and data structures, or a subset or superset thereof:

-   -   Operating logic 616 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Hub device communication module 618 for connecting to and        communicating with other network devices (e.g., network        interface 160, such as a router that provides Internet        connectivity, networked storage devices, network routing        devices, server system 508, etc.) connected to one or more        networks 162 via one or more communication interfaces 604 (wired        or wireless);    -   Radio Communication Module 620 for connecting the hub device 180        to other devices (e.g., controller devices, smart devices 204 in        smart home environment 100, client devices 504) via one or more        radio communication devices (e.g., radios 640);    -   User interface module 622 for providing and displaying a user        interface in which settings, captured data, and/or other data        for one or more devices (e.g., smart devices 204 in smart home        environment 100) can be configured and/or viewed; and    -   Hub device database 624, including but not limited to:        -   Sensor information 6240 for storing and managing data            received, detected, and/or transmitted by one or more            sensors of the hub device 180 and/or one or more other            devices (e.g., smart devices 204 in smart home environment            100);        -   Device settings 6242 for storing operational settings for            one or more devices (e.g., coupled smart devices 204 in            smart home environment 100); and        -   Communication protocol information 6244 for storing and            managing protocol information for one or more protocols            (e.g., standard wireless protocols, such as ZigBee, Z-Wave,            etc., and/or custom or standard wired protocols, such as            Ethernet).

Each of the above identified elements (e.g., modules stored in memory206 of hub device 180) may be stored in one or more of the previouslymentioned memory devices (e.g., the memory of any of the smart devicesin smart home environment 100, FIG. 1), and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory606, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 606, optionally, stores additionalmodules and data structures not described above.

FIG. 7A is a block diagram illustrating the hub device server system 508in accordance with some implementations. The hub device server system508, typically, includes one or more processing units (CPUs) 702, one ormore network interfaces 704 (e.g., including an I/O interface to one ormore client devices and an I/O interface to one or more electronicdevices), memory 706, and one or more communication buses 708 forinterconnecting these components (sometimes called a chipset). Memory706 includes high-speed random access memory, such as DRAM, SRAM, DDRRAM, or other random access solid state memory devices; and, optionally,includes non-volatile memory, such as one or more magnetic disk storagedevices, one or more optical disk storage devices, one or more flashmemory devices, or one or more other non-volatile solid state storagedevices. Memory 706, optionally, includes one or more storage devicesremotely located from one or more processing units 702. Memory 706, oralternatively the non-volatile memory within memory 706, includes anon-transitory computer readable storage medium. In someimplementations, memory 706, or the non-transitory computer readablestorage medium of memory 706, stores the following programs, modules,and data structures, or a subset or superset thereof:

-   -   Operating system 710 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Network communication module 712 for connecting the hub device        server system 508 to other systems and devices (e.g., client        devices, electronic devices, and systems connected to one or        more networks 162, FIGS. 1-5B) via one or more network        interfaces 704 (wired or wireless);    -   Server-side module 714, which provides server-side        functionalities for device control, data processing and data        review, including but not limited to:        -   Data receiving module 7140 for receiving data from            electronic devices (e.g., video data from a camera 118,            FIG. 1) via the hub device 180, and preparing the received            data for further processing and storage in the data storage            database 7160;        -   Hub and device control module 7142 for generating and            sending server-initiated control commands to modify            operation modes of electronic devices (e.g., devices of a            smart home environment 100), and/or receiving (e.g., from            client devices 504) and forwarding user-initiated control            commands to modify operation modes of the electronic            devices;        -   Data processing module 7144 for processing the data provided            by the electronic devices, and/or preparing and sending            processed data to a device for review (e.g., client devices            504 for review by a user); and    -   Server database 716, including but not limited to:        -   Data storage database 7160 for storing data associated with            each electronic device (e.g., each camera) of each user            account, as well as data processing models, processed data            results, and other relevant metadata (e.g., names of data            results, location of electronic device, creation time,            duration, settings of the electronic device, etc.)            associated with the data, wherein (optionally) all or a            portion of the data and/or processing associated with the            hub device 180 or smart devices are stored securely;        -   Account database 7162 for storing account information for            user accounts, including user account information,            information and settings for linked hub devices and            electronic devices (e.g., hub device identifications), hub            device specific secrets, relevant user and hardware            characteristics (e.g., service tier, device model, storage            capacity, processing capabilities, etc.), user interface            settings, data review preferences, etc., where the            information for associated electronic devices includes, but            is not limited to, one or more device identifiers (e.g., MAC            address and UUID), device specific secrets, and displayed            titles; and        -   Device Information Database 7164 for storing device            information related to one or more hub devices, e.g., device            identifiers and hub device specific secrets, independently            of whether the corresponding hub devices have been            associated with any user account.

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory706, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 706, optionally, stores additionalmodules and data structures not described above.

FIG. 7B is a block diagram illustrating the video server 554 inaccordance with some implementations. The video server 554, typically,includes one or more processing units (CPUs) 718, one or more networkinterfaces 720, memory 722, and one or more communication buses 724 forinterconnecting these components (sometimes called a chipset). Memory722 includes high-speed random access memory, such as DRAM, SRAM, DDRRAM, or other random access solid state memory devices; and, optionally,includes non-volatile memory, such as one or more magnetic disk storagedevices, one or more optical disk storage devices, one or more flashmemory devices, or one or more other non-volatile solid state storagedevices. Memory 722, optionally, includes one or more storage devicesremotely located from one or more processing units 718. Memory 722, oralternatively the non-volatile memory within memory 722, includes anon-transitory computer readable storage medium. In someimplementations, memory 722, or the non-transitory computer readablestorage medium of memory 722, stores the following programs, modules,and data structures, or a subset or superset thereof:

-   -   Operating system 726 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Network communication module 728 for connecting the video server        554 to other systems and devices (e.g., client devices,        electronic devices, and systems connected to one or more        networks 162, FIGS. 1-5B) via one or more network interfaces 720        (wired or wireless);    -   Video server module 730, which provides server-side data        processing and functionalities for video and event monitoring        and review, including but not limited to:        -   Account administration module 7300 for creating reviewer            accounts, performing camera registration processing to            establish associations between video sources to their            respective reviewer accounts, and providing account            login-services to the client devices 504;        -   Video data receiving module 7302 for receiving raw video            data from the video sources 522, and preparing the received            video data for event processing and long-term storage in the            video storage database 514;        -   Camera control module 7304 for generating and sending            server-initiated control commands to modify the operation            modes of the video sources, and/or receiving and forwarding            user-initiated control commands to modify the operation            modes of the video sources 522;        -   Event detection module 7306 for detecting motion event            candidates in video streams from each of the video sources            522, including motion track identification, false positive            suppression, and event mask generation and caching;        -   Event categorization module 7308 for categorizing motion            events detected in received video streams;        -   Zone creation module 73010 for generating zones of interest            in accordance with user input;        -   Person identification module 73012 for identifying            characteristics associated with presence of humans in the            received video streams;        -   Filter application module 73014 for selecting event filters            (e.g., event categories, zones of interest, a human filter,            etc.) and applying the selected event filter to past and new            motion events detected in the video streams;        -   Zone monitoring module 73016 for monitoring motions within            selected zones of interest and generating notifications for            new motion events detected within the selected zones of            interest, where the zone monitoring takes into account            changes in surrounding context of the zones and is not            confined within the selected zones of interest;        -   Real-time motion event presentation module 73018 for            dynamically changing characteristics of event indicators            displayed in user interfaces as new event filters, such as            new event categories or new zones of interest, are created,            and for providing real-time notifications as new motion            events are detected in the video streams; and        -   Event post-processing module 3020 for providing summary            time-lapse for past motion events detected in video streams,            and providing event and category editing functions to user            for revising past event categorization results;        -   Alert events module 73022 for receiving information on alert            events (e.g., detected hazards, detected sounds, etc.),            instructing cameras 118 to capture video in accordance with            alert event information, and determining chronologies of            alert events; and        -   Camera events module 73024 for associating captured video            with alert events, from the same smart home environment 100,            that are proximate or contemporaneous in time, and logging            camera histories of camera events; and    -   Server database 732, including but not limited to:        -   Video storage database 7320 storing raw video data            associated with each of the video sources 522 (each            including one or more cameras 118) of each reviewer account,            as well as event categorization models (e.g., event            clusters, categorization criteria, etc.), event            categorization results (e.g., recognized event categories,            and assignment of past motion events to the recognized event            categories, representative events for each recognized event            category, etc.), event masks for past motion events, video            segments for each past motion event, preview video (e.g.,            sprites) of past motion events, and other relevant metadata            (e.g., names of event categories, location of the cameras            118, creation time, duration, etc.) associated with the            motion events;        -   Account database 7324 for storing account information for            user accounts, including user account information,            information and settings for linked hub devices and            electronic devices (e.g., hub device identifications), hub            device specific secrets, relevant user and hardware            characteristics (e.g., service tier, device model, storage            capacity, processing capabilities, etc.), user interface            settings, data review preferences, etc., where the            information for associated electronic devices includes, but            is not limited to, one or more device identifiers (e.g., MAC            address and UUID), device specific secrets, and displayed            titles;        -   Device Information Database 7326 for storing device            information related to one or more hub devices, e.g., device            identifiers and hub device specific secrets, independently            of whether the corresponding hub devices have been            associated with any user account; and        -   Camera events history 7328 for storing per-camera histories            of camera events, including alert events, chronologies of            alert events, and references to associated videos in the            video storage database 7320.

Video data stored in the video storage database 7320 includeshigh-quality versions 7321 and low-quality versions 7322 of videosassociated with each of the video sources 522. High-quality video 7321includes video in relatively high resolutions (e.g., 720P and/or 1080P)and relatively high frame rates (e.g., 24 frames per second).Low-quality video 7322 includes video in relatively low resolutions(e.g., 180P) and relatively low frame rates (e.g., 5 frames per second,10 frames per second).

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory722, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 722, optionally, stores additionalmodules and data structures not described above.

FIG. 7C is a block diagram illustrating the client interface server 556in accordance with some implementations. The client interface server556, typically, includes one or more processing units (CPUs) 734, one ormore network interfaces 736, memory 738, and one or more communicationbuses 740 for interconnecting these components (sometimes called achipset). Memory 738 includes high-speed random access memory, such asDRAM, SRAM, DDR RAM, or other random access solid state memory devices;and, optionally, includes non-volatile memory, such as one or moremagnetic disk storage devices, one or more optical disk storage devices,one or more flash memory devices, or one or more other non-volatilesolid state storage devices. Memory 738, optionally, includes one ormore storage devices remotely located from one or more processing units734. Memory 738, or alternatively the non-volatile memory within memory738, includes a non-transitory computer readable storage medium. In someimplementations, memory 738, or the non-transitory computer readablestorage medium of memory 738, stores the following programs, modules,and data structures, or a subset or superset thereof:

-   -   Operating system 742 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Network communication module 744 for connecting the client        interface server 556 to other systems and devices (e.g., client        devices, video server 554, and systems connected to one or more        networks 162, FIGS. 1-5B) via one or more network interfaces 740        (wired or wireless);    -   Client interface module 746, which provides an I/O interface        between client devices 504 and the video server 554, including        but not limited to:        -   Video feed module 7462 for transmitting videos from the            video server system, or images extracted from same videos,            to client devices as video streams or periodically refreshed            images, and optionally transmitting particular views of            videos or images from videos;        -   Transcode module 7464 for rescaling (e.g., downscaling from            720P to 180P) video for transmission to client devices 504;        -   Client input module 7466 for receiving and processing input            commands from client devices (e.g., client device 504) 504            to change the video view being transmitted or controlling a            video source 522;        -   Camera view module 7468 for determining which views of            videos or images from videos are to be transmitted to client            devices; and        -   User interface module 74610 for generating user interfaces            (e.g., web pages), transmitted to client devices 504, for            viewing video feeds and corresponding event histories.

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory738, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 738, optionally, stores additionalmodules and data structures not described above.

FIG. 7D is a block diagram illustrating the camera interface server 558in accordance with some implementations. The camera interface server558, typically, includes one or more processing units (CPUs) 748, one ormore network interfaces 750, memory 752, and one or more communicationbuses 754 for interconnecting these components (sometimes called achipset). Memory 752 includes high-speed random access memory, such asDRAM, SRAM, DDR RAM, or other random access solid state memory devices;and, optionally, includes non-volatile memory, such as one or moremagnetic disk storage devices, one or more optical disk storage devices,one or more flash memory devices, or one or more other non-volatilesolid state storage devices. Memory 752, optionally, includes one ormore storage devices remotely located from one or more processing units748. Memory 752, or alternatively the non-volatile memory within memory752, includes a non-transitory computer readable storage medium. In someimplementations, memory 752, or the non-transitory computer readablestorage medium of memory 752, stores the following programs, modules,and data structures, or a subset or superset thereof:

-   -   Operating system 756 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Network communication module 758 for connecting the camera        interface server 558 to other systems and devices (e.g., client        devices, video server 554, and systems connected to one or more        networks 162, FIGS. 1-5B) via one or more network interfaces 754        (wired or wireless); and    -   Camera interface module 760 for providing an I/O interface        between video sources 522 and the video server 554.

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory752, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 752, optionally, stores additionalmodules and data structures not described above.

In some implementations, at least some of the functions of the videoserver 554, client interface server 556, and camera interface server 558are performed by the hub device server system 508, and the correspondingmodules and sub-modules of these functions may be included in the hubdevice server system 508. In some implementations, at least some of thefunctions of the hub device server system 508 are performed by the videoserver 554, client interface server 556, and/or camera interface server558, and the corresponding modules and sub-modules of these functionsmay be included in the video server 554, client interface server 556,and/or camera interface server 558.

FIGS. 8A-8B are block diagrams illustrating a representative clientdevice 504 associated with a user (e.g., reviewer) account in accordancewith some implementations. The client device 504, typically, includesone or more processing units (CPUs) 802, one or more network interfaces804, memory 806, and one or more communication buses 808 forinterconnecting these components (sometimes called a chipset). Theclient device also includes a user interface 810 and one or morebuilt-in sensors 890 (e.g., accelerometer 892 and gyroscope 894). Userinterface 810 includes one or more output devices 812 that enablepresentation of media content, including one or more speakers and/or oneor more visual displays. User interface 810 also includes one or moreinput devices 814, including user interface components that facilitateuser input such as a keyboard, a mouse, a voice-command input unit ormicrophone, a touch screen display, a touch-sensitive input pad, agesture capturing camera, or other input buttons or controls.Furthermore, the client device 504 optionally uses a microphone andvoice recognition or a camera and gesture recognition to supplement orreplace the keyboard. Further, the client device 504 optionally uses theaccelerometer to detect changes in the orientation of the client device504, and in particular applications and contexts interpret the change inorientation detected by the accelerometer as user input. In someimplementations, the client device 504 includes one or more cameras,scanners, or photo sensor units for capturing images (not shown). Insome implementations, the client device 504 optionally includes alocation detection device 816, such as a GPS (global positioningsatellite) or other geo-location receiver, for determining the locationof the client device 504.

Memory 806 includes high-speed random access memory, such as DRAM, SRAM,DDR RAM, or other random access solid state memory devices; and,optionally, includes non-volatile memory, such as one or more magneticdisk storage devices, one or more optical disk storage devices, one ormore flash memory devices, or one or more other non-volatile solid statestorage devices. Memory 806, optionally, includes one or more storagedevices remotely located from one or more processing units 802. Memory806, or alternatively the non-volatile memory within memory 806,includes a non-transitory computer readable storage medium. In someimplementations, memory 806, or the non-transitory computer readablestorage medium of memory 806, stores the following programs, modules,and data structures, or a subset or superset thereof:

-   -   Operating system 818 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Network communication module 820 for connecting the client        device 504 to other systems and devices (e.g., hub device server        system 508, video server system 552, video sources 522)        connected to one or more networks 162 via one or more network        interfaces 804 (wired or wireless);    -   Presentation module 821 for enabling presentation of information        (e.g., user interfaces for application(s) 824 and web browser        module 823 or the client-side module 502, widgets, websites and        web pages thereof, and/or games, audio and/or video content,        text, etc.) at the client device 504 via the one or more output        devices 812 (e.g., displays, speakers, etc.) associated with the        user interface 810;    -   Input processing module 822 for detecting one or more user        inputs or interactions from one of the one or more input devices        814 and optionally the accelerometer 892 and interpreting the        detected input or interaction;    -   Web browser module 823 for navigating, requesting (e.g., via        HTTP), and displaying websites and web pages thereof, including        a web interface for logging into a reviewer account, controlling        the video sources associated with the reviewer account,        establishing and selecting event filters, and editing and        reviewing motion events detected in the video streams of the        video sources;    -   One or more applications 824 for execution by the client device        504 (e.g., games, social network applications, smart home        applications, and/or other web or non-web based applications),        for controlling devices (e.g., sending commands, configuring        settings, etc. to hub devices and/or other client or electronic        devices), and for reviewing data captured by the devices (e.g.,        device status and settings, captured data, or other information        regarding the hub device or other connected devices);    -   User interface module 826 for providing and displaying a user        interface in which settings, captured data, and/or other data        for one or more devices (e.g., smart devices 204 in smart home        environment 100) can be configured and/or viewed;    -   Client-side module 502, which provides client-side data        processing and functionalities for device control, data        processing, data review, and monitoring and reviewing videos        from one or more video sources and camera events, including but        not limited to:        -   Hub device and device control module 8280 for generating            control commands for modifying an operating mode of the hub            device or the electronic devices in accordance with user            inputs; and        -   Data review module 8282 for providing user interfaces for            reviewing data processed by the hub device server system 508            or video server system 552;        -   Account registration module 8284 for establishing a reviewer            account and registering one or more video sources with the            hub device server system 508 or video server system 552;        -   Camera setup module 8286 for setting up one or more video            sources within a local area network, and enabling the one or            more video sources to access the hub device server system            508 or video server system 552 on the Internet through the            local area network;        -   Camera control module 8288 for generating control commands            for modifying an operating mode of the one or more video            sources in accordance with user input;        -   Event review interface module 82810 for providing user            interfaces for reviewing event timelines, camera histories            with camera events, editing event categorization results,            selecting event filters, presenting real-time filtered            motion events based on existing and newly created event            filters (e.g., event categories, zones of interest, a human            filter, etc.), presenting real-time notifications (e.g.,            pop-ups) for newly detected motion events, and presenting            smart time-lapse of selected motion events;        -   Zone creation module 82814 for providing a user interface            for creating zones of interest for each video stream in            accordance with user input, and sending the definitions of            the zones of interest to the hub device server system 508 or            video server system 552;        -   Notification module 82814 for generating real-time            notifications for all or selected alert events or motion            events on the client device 504 outside of the event review            user interface; and        -   Camera view module 82816 for generating control commands for            modifying a view of a video transmitted to the client device            504 in accordance with user input; and    -   Client data 830 storing data associated with the user account,        electronic devices, and video sources 522, including, but is not        limited to:        -   Account data 8300 storing information related to both user            accounts loaded on the client device 504 and electronic            devices (e.g., of the video sources 522) associated with the            user accounts, wherein such information includes cached            login credentials, hub device identifiers (e.g., MAC            addresses and UUIDs), electronic device identifiers (e.g.,            MAC addresses and UUIDs), user interface settings, display            preferences, authentication tokens and tags, password keys,            etc.,        -   Local data storage database 8302 for selectively storing raw            or processed data associated with electronic devices (e.g.,            of the video sources 522, such as a camera 118); and        -   Video data cache 8304 for caching video and image data from            video feeds;    -   Blurred image data 832; and    -   Blurring algorithms and parameters 834; for generating blurred        image data 832 from video/image data in video data cache 8304.

Video data cache 8304 includes cached video/image data for respectivecameras associated with a user of the client device 804. For example, asshown in FIG. 8B, the video data cache 8304 includes cached video/imagedata 8304-1 for a first camera, cached video/image data 8304-2 for asecond camera, up to cached video/image data 8304-p for a p-th camera.At a given moment, video data cache 8304 may not have cached video/imagedata for a given camera (e.g., due to the camera being newly associatedwith the user, due to the cache being cleared, due to the cachedvideo/image data being expired and removed from the cache).

Blurred image data 832 includes sets of progressively blurred images forrespective cameras. For example, as shown in FIG. 8B, the blurred imagedata 832 includes blurred image data (e.g., a set of progressivelyblurred images) 832-1 for the first camera, blurred image data 832-2 forthe second camera, up to blurred image data 832-p for the p-th camera.

In some implementations, the client device 504 caches camera history aswell as video data 8304. For example, whenever the client device 504receives camera events history 7328 data from the video server 554, themost recent camera events history (e.g., history from the past twohours, the most recent 20 events) is cached at the client device (e.g.,in client data 830). This cached history data may be accessed for quickdisplay of camera history information (e.g., in user interface 1304(FIG. 13A)).

In some implementations, the client-side module 502 and user interfacemodule 826 are parts, modules, or components of a particular application824 (e.g., a smart home management application).

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, modules or datastructures, and thus various subsets of these modules may be combined orotherwise re-arranged in various implementations. In someimplementations, memory 806, optionally, stores a subset of the modulesand data structures identified above. Furthermore, memory 806,optionally, stores additional modules and data structures not describedabove.

In some implementations, at least some of the functions of the hubdevice server system 508 or the video server system 552 are performed bythe client device 504, and the corresponding sub-modules of thesefunctions may be located within the client device 504 rather than thehub device server system 508 or video server system 552. In someimplementations, at least some of the functions of the client device 504are performed by the hub device server system 508 or video server system552, and the corresponding sub-modules of these functions may be locatedwithin the hub device server system 508 or video server system 552rather than the client device 504. The client device 504 and the hubdevice server system 508 or video server system 552 shown in FIGS. 7A-8,respectively, are merely illustrative, and different configurations ofthe modules for implementing the functions described herein are possiblein various implementations.

FIG. 9A is a block diagram illustrating a representative smart device204 in accordance with some implementations. In some implementations,the smart device 204 (e.g., any devices of a smart home environment 100,FIGS. 1 and 2) includes one or more processing units (e.g., CPUs, ASICs,FPGAs, microprocessors, and the like) 902, one or more communicationinterfaces 904, memory 906, radios 940, and one or more communicationbuses 908 for interconnecting these components (sometimes called achipset). In some implementations, user interface 910 includes one ormore output devices 912 that enable presentation of media content,including one or more speakers and/or one or more visual displays. Insome implementations, user interface 910 also includes one or more inputdevices 914, including user interface components that facilitate userinput such as a keyboard, a mouse, a voice-command input unit ormicrophone, a touch screen display, a touch-sensitive input pad, agesture capturing camera, or other input buttons or controls.Furthermore, some smart devices 204 use a microphone and voicerecognition or a camera and gesture recognition to supplement or replacethe keyboard. In some implementations, the smart device 204 includes oneor more image/video capture devices 918 (e.g., cameras, video cameras,scanners, photo sensor units). Optionally, the client device includes alocation detection device 916, such as a GPS (global positioningsatellite) or other geo-location receiver, for determining the locationof the smart device 204.

The built-in sensors 990 include, for example, one or more thermalradiation sensors, ambient temperature sensors, humidity sensors, IRsensors, occupancy sensors (e.g., using RFID sensors), ambient lightsensors, motion detectors, accelerometers, and/or gyroscopes.

The radios 940 enable one or more radio communication networks in thesmart home environments, and allow a smart device 204 to communicatewith other devices. In some implementations, the radios 940 are capableof data communications using any of a variety of custom or standardwireless protocols (e.g., IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread,Z-Wave, Bluetooth Smart, ISA100.11a, WirelessHART, MiWi, etc.) custom orstandard wired protocols (e.g., Ethernet, HomePlug, etc.), and/or anyother suitable communication protocol, including communication protocolsnot yet developed as of the filing date of this document.

Communication interfaces 904 include, for example, hardware capable ofdata communications using any of a variety of custom or standardwireless protocols (e.g., IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread,Z-Wave, Bluetooth Smart, ISA100.11a, WirelessHART, MiWi, etc.) and/orany of a variety of custom or standard wired protocols (e.g., Ethernet,HomePlug, etc.), or any other suitable communication protocol, includingcommunication protocols not yet developed as of the filing date of thisdocument.

Memory 906 includes high-speed random access memory, such as DRAM, SRAM,DDR RAM, or other random access solid state memory devices; and,optionally, includes non-volatile memory, such as one or more magneticdisk storage devices, one or more optical disk storage devices, one ormore flash memory devices, or one or more other non-volatile solid statestorage devices. Memory 906, or alternatively the non-volatile memorywithin memory 906, includes a non-transitory computer readable storagemedium. In some implementations, memory 906, or the non-transitorycomputer readable storage medium of memory 906, stores the followingprograms, modules, and data structures, or a subset or superset thereof:

-   -   Operating logic 920 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Device communication module 922 for connecting to and        communicating with other network devices (e.g., network        interface 160, such as a router that provides Internet        connectivity, networked storage devices, network routing        devices, server system 508, etc.) connected to one or more        networks 162 via one or more communication interfaces 904 (wired        or wireless);    -   Radio Communication Module 924 for connecting the smart device        204 to other devices (e.g., controller devices, smart devices        204 in smart home environment 100, client devices 504) via one        or more radio communication devices (e.g., radios 940)    -   Input processing module 926 for detecting one or more user        inputs or interactions from the one or more input devices 914        and interpreting the detected inputs or interactions;    -   User interface module 928 for providing and displaying a user        interface in which settings, captured data, and/or other data        for one or more devices (e.g., the smart device 204, and/or        other devices in smart home environment 100) can be configured        and/or viewed;    -   One or more applications 930 for execution by the smart device        930 (e.g., games, social network applications, smart home        applications, and/or other web or non-web based applications)        for controlling devices (e.g., executing commands, sending        commands, and/or configuring settings of the smart device 204        and/or other client/electronic devices), and for reviewing data        captured by devices (e.g., device status and settings, captured        data, or other information regarding the smart device 204 and/or        other client/electronic devices);    -   Device-side module 932, which provides device-side        functionalities for device control, data processing and data        review, including but not limited to:        -   Command receiving module 9320 for receiving, forwarding,            and/or executing instructions and control commands (e.g.,            from a client device 504, from a smart home provider server            system 164, from user inputs detected on the user interface            910, etc.) for operating the smart device 204;        -   Data processing module 9322 for processing data captured or            received by one or more inputs (e.g., input devices 914,            image/video capture devices 918, location detection device            916), sensors (e.g., built-in sensors 990), interfaces            (e.g., communication interfaces 904, radios 940), and/or            other components of the smart device 204, and for preparing            and sending processed data to a device for review (e.g.,            client devices 504 for review by a user); and    -   Device data 934 storing data associated with devices (e.g., the        smart device 204), including, but is not limited to:        -   Account data 9340 storing information related to user            accounts loaded on the smart device 204, wherein such            information includes cached login credentials, smart device            identifiers (e.g., MAC addresses and UUIDs), user interface            settings, display preferences, authentication tokens and            tags, password keys, etc.; and        -   Local data storage database 9342 for selectively storing raw            or processed data associated with the smart device 204            (e.g., video surveillance footage captured by a camera 118).

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory906, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 906, optionally, stores additionalmodules and data structures not described above.

FIG. 9B is a block diagram illustrating a representative camera 118 inaccordance with some implementations. In some implementations, thecamera 118 includes one or more processing units or controllers (e.g.,CPUs, ASICs, FPGAs, microprocessors, and the like) 942, one or morecommunication interfaces 944, memory 946, one or more communicationbuses 948 for interconnecting these components (sometimes called achipset), a lens assembly 9620, an IR filter 9622, an image sensor array9624, and IR illuminators 9626 (e.g., IR LEDs). In some implementations,the lens system 9620 focuses incident light on the image sensor array9624, which captures respective color components (e.g., R, G and Bcomponents) of the incident light focused on respective sensor arraylocations. When the camera is in Day mode, the IR filter 9622 isenabled/interposed between the lens system 9620 and the sensor array9624 to block IR components of the incident light. When the camera is inNight mode, the IR filter 9622 is disabled so the image sensor array9624 can receive incident IR light from a scene illuminated by thecamera's onboard IR illuminators 9626 or external IR illuminators. Insome implementations, the camera 118 includes one or more input devices950 such as one or more buttons for receiving input and one or moremicrophones. In some implementations, the camera 118 includes one ormore output devices 952 such as one or more indicator lights, a soundcard, a speaker, a small display for displaying textual information anderror codes, playing audio, etc. In some implementations, the camera 118optionally includes a location detection device 954, such as a GPS(global positioning satellite) or other geo-location receiver, fordetermining the location of the camera 118.

Communication interfaces 944 include, for example, hardware capable ofdata communications using any of a variety of custom or standardwireless protocols (e.g., IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread,Z-Wave, Bluetooth Smart, ISA100.11a, WirelessHART, MiWi, etc.) and/orany of a variety of custom or standard wired protocols (e.g., Ethernet,HomePlug, etc.), or any other suitable communication protocol, includingcommunication protocols not yet developed as of the filing date of thisdocument.

Memory 946 includes high-speed random access memory, such as DRAM, SRAM,DDR RAM, or other random access solid state memory devices; and,optionally, includes non-volatile memory, such as one or more magneticdisk storage devices, one or more optical disk storage devices, one ormore flash memory devices, or one or more other non-volatile solid statestorage devices. Memory 946, or alternatively the non-volatile memorywithin memory 946, includes a non-transitory computer readable storagemedium. In some implementations, memory 946, or the non-transitorycomputer readable storage medium of memory 946, stores the followingprograms, modules, and data structures, or a subset or superset thereof:

-   -   Operating system 956 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Network communication module 958 for connecting the camera 118        to other computing devices (e.g., hub device server system 508,        video server system 552, the client device 504, network routing        devices, one or more controller devices, and networked storage        devices) connected to the one or more networks 162 via the one        or more communication interfaces 944 (wired or wireless);    -   Video control module 960 for modifying the operation mode (e.g.,        zoom level, resolution, frame rate, recording and playback        volume, lighting adjustment (e.g., performed by auto white        balance (AWB) program module 960 a), AE and IR modes, etc.) of        the camera 118, enabling/disabling the audio and/or video        recording functions of the camera 118, changing the pan and tilt        angles of the camera 118, resetting the camera 118,        enabling/disabling the IR filter 9622, and/or the like; The        video control module 960 also includes a mode control program        module 960 b that determines when to switch from Night mode to        Day mode and vice-versa in accordance with some implementions;    -   Video capturing module 964 for capturing and generating a video        stream and sending the video stream to the hub device server        system 508 or video server system 552 as a continuous feed or in        short bursts, and optionally generating a rescaled version of        the video stream and sending the video stream at the original        captured resolution and the rescaled resolution;    -   Video caching module 966 for storing some or all captured video        data locally at one or more local storage devices (e.g., memory,        flash drives, internal hard disks, portable disks, etc.);    -   Local video processing module 968 for performing preliminary        processing of the captured video data locally at the camera 118,        including for example, compressing and encrypting the captured        video data for network transmission, preliminary motion event        detection, preliminary false positive suppression for motion        event detection, preliminary motion vector generation, etc.; and    -   Camera data 970 storing data, including but not limited to:        -   Camera settings 972, including network settings, camera            operation settings (such as frame rate 972 a, analog sensor            gain 972 b, and Day/Night mode setting 972 c), camera            storage settings, etc.; and        -   Video data 974, including video segments and motion vectors            for detected motion event candidates to be sent to the hub            device server system 508 or video server system 552.        -   Raw sensor data 9760 (e.g., R, G and B components) captured            from sensor pixel locations in the sensor array 9624 and            saved as a raw image frame; in some implementations, the            sensor is a “Bayer” sensor, where R, G and B pixels are            captured from alternate sensor pixel locations in such a way            that two times more G component values are captured than R            or B component values; other implementations employ            different types of sensors to provide the Raw sensor data            9760, including sensors with other arrangements of R, G and            B color filters (e.g., a sensor producing an equal number of            R, G and B components), and sensors that employ different            color filters (e.g., a sensor with cyan (C), yellow (Y) and            magenta (M) color filters, which produces C, Y and M            components). An example view of the R, G and B values from a            Bayer sensor is shown in FIG. 9C. Implementations described            herein may employ data (e.g., color component values or            ratios thereof) from all or a portion of the sensor array            9624; accordingly, a reference herein to a “sensor array” or            a “color sensor array” may refer to all or a portion of the            sensor array 9624. In some implementations, a group of            sensor arrays, including a sensor array subdivided into            tiles, may be referred to as a “sensor array system” or a            “color sensor array system.”        -   Auto white balance (AWB) data 9762, including data derived            from the raw sensor data 9760 used to identify and            compensate for the color temperature of the ambient light            condition (e.g., sunlight vs. incandescent light vs.            fluorescent light, etc.); in some implementations, the AWB            data 9762 includes R/G and B/G ratios for respective pixel            locations derived from the corresponding raw Bayer sensor            data 9760; in some implementations, these ratios are used            directly to determine whether to switch from Night mode to            Day mode. An example view of the R/G and B/G values from a            the AWB data 9762 is shown in FIG. 9D.        -   All_lights lookup table (LUT) 9764, a table used in the            Night mode to Day mode switching method of the present            application to identify based on pairs of R/G and B/G ratios            from the AWB table 9762 whether the associated ambient light            is due to other than an IR illuminant; as shown in FIG. 9E,            described below, the majority of the table is filled with 1            s (meaning the light is due to other than an IR-only            illuminant), except for a small region around R/G=1, B/G=1            associated with 0 lux (IR only) light sources. The            all_lights lookup table is described further in reference to            FIGS. 13A-C.        -   Sunlight lookup table (LUT) 9766, a table used in the Night            mode to Day mode switching method of the present application            to identify based on pairs of R/G and B/G ratios from the            AWB table 9762 whether the associated ambient light is due            to sunlight, incandescent or similar light sources that are            comparatively heavy emitters of IR light as compared to            visible light; as shown in FIGS. 9E and 9F, this table            corresponds to a small region of the All_lights table—and is            filled with 1 s to represent where the corresponding R/G and            B/G values are associated with sunlight and incandescent            light. The sunlight lookup table is described further in            reference to FIGS. 13A-C.

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory946, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 946, optionally, stores additionalmodules and data structures not described above. Additionally, camera118, being an example of a smart device 204, optionally includescomponents and modules included in smart device 204 as shown in FIG. 9Athat are not shown in FIG. 9B.

In some implementions, the camera 118 captures surveillance video usinga digital imaging system. Digital images (frames) are captured as asequence at a particular frame rate 972 a, compressed, and then sent tothe “cloud” (e.g., the hub device server system 508 or the video serversystem 552) for storage and retrieval. In some implementations, eachframe (e.g., the raw sensor data 9760) is composed of 1280 by 720 pixels(1280×720) and each pixel location has 3 color components, red, greenand blue. The camera 118 operates in one of two modes (e.g., indicatedby the Day/Night mode value 972 c) depending on the ambient lightingconditions. Day mode is used when there is sufficient ambient light toadequately illuminate the scene. Night mode is used when there is notenough light to adequately illuminate the scene.

In some implementations, when operating in Day mode, the camera 118 usesthe ambient lighting sources to illuminate the scene and capturesurveillance video. In some implementations, the minimum lux level atwhich the camera captures 118 video in Day mode is between 0.1 to 1 luxdepending on the color temperature of the dominant illuminant. Once theminimum lux level is reached, the camera automatically switches to Nightmode. Switching to Night mode includes mechanically disabling/removingthe IR filter 9622 and enabling a set of IR LEDs 9626 to provideillumination for the scene. Nightmode is maintained until the camera 118detects an external illuminant.

In an implementation of a prior mode switching technique (describedfurther with reference to FIG. 12A), the camera 118 does detects anexternal illuminant by comparing the average maximum R, G, or B pixelsto the minimum average R, G, or B pixels. The averages are calculatedover a majority of the image. By comparing max to min values to athreshold it can be determined whether or not an external illuminant ispresent at a minimal lux level. Unfortunately, the lux level at whichswitching occurs varies with the color temperature of the illuminant,thus with this prior mode switching method there are scenes in whichswitching occurs too early, negating any hysteresis available, andresulting in oscillations between Day mode and Night mode. Additionally,some illuminants are not detected at all, resulting in the camera neverswitching from Night mode to Day mode.

FIG. 10 is a block diagram illustrating the smart home provider serversystem 164 in accordance with some implementations. The smart homeprovider server system 164, typically, includes one or more processingunits (CPUs) 1002, one or more network interfaces 1004 (e.g., includingan I/O interface to one or more client devices and an I/O interface toone or more electronic devices), memory 1006, and one or morecommunication buses 1008 for interconnecting these components (sometimescalled a chipset). Memory 1006 includes high-speed random access memory,such as DRAM, SRAM, DDR RAM, or other random access solid state memorydevices; and, optionally, includes non-volatile memory, such as one ormore magnetic disk storage devices, one or more optical disk storagedevices, one or more flash memory devices, or one or more othernon-volatile solid state storage devices. Memory 1006, optionally,includes one or more storage devices remotely located from one or moreprocessing units 1002. Memory 1006, or alternatively the non-volatilememory within memory 1006, includes a non-transitory computer readablestorage medium. In some implementations, memory 1006, or thenon-transitory computer readable storage medium of memory 1006, storesthe following programs, modules, and data structures, or a subset orsuperset thereof:

-   -   Operating system 1010 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Network communication module 1012 for connecting the smart home        provider server system 164 to other systems and devices (e.g.,        client devices, electronic devices, hub device server system        508, video server system 552, and systems connected to one or        more networks 162, FIGS. 1-5B) via one or more network        interfaces 1004 (wired or wireless);    -   Server-side module 1014, which provides server-side        functionalities for device control, data processing and data        review, including but not limited to:        -   Data receiving module 10140 for receiving data from            electronic devices (e.g., video data from a camera 118, FIG.            1), and preparing the received data for further processing            and storage in the data storage database 10160;        -   Device control module 10142 for generating and sending            server-initiated control commands to modify operation modes            of electronic devices (e.g., devices of a smart home            environment 100), and/or receiving (e.g., from client            devices 504) and forwarding user-initiated control commands            to modify operation modes of the electronic devices;        -   Data processing module 10144 for processing the data            provided by the electronic devices, and/or preparing and            sending processed data to a device for review (e.g., client            devices 504 for review by a user); and    -   Server database 1016, including but not limited to:        -   Data storage database 10160 for storing data associated with            each electronic device (e.g., each camera) of each user            account, as well as data processing models, processed data            results, and other relevant metadata (e.g., names of data            results, location of electronic device, creation time,            duration, settings of the electronic device, etc.)            associated with the data, wherein (optionally) all or a            portion of the data and/or processing associated with the            electronic devices are stored securely; and        -   Account database 10162 for storing account information for            user accounts, including user account information,            information and settings for linked hub devices and            electronic devices (e.g., hub device identifications), hub            device specific secrets, relevant user and hardware            characteristics (e.g., service tier, device model, storage            capacity, processing capabilities, etc.), user interface            settings, data review preferences, etc., where the            information for associated electronic devices includes, but            is not limited to, one or more device identifiers (e.g., MAC            address and UUID), device specific secrets, and displayed            titles.

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory1006, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 1006, optionally, storesadditional modules and data structures not described above.

Furthermore, in some implementations, the functions of any of thedevices and systems described herein (e.g., hub device 180, hub deviceserver system 508, video server system 552, client device 504, smartdevice 204, camera 118, smart home provider server system 164) areinterchangeable with one another and may be performed by any otherdevices or systems, where the corresponding sub-modules of thesefunctions may additionally and/or alternatively be located within andexecuted by any of the devices and systems. As one example, generatingof user interfaces may be performed by the user interface module 74610(which may be located at the client interface server 556 or at the videoserver 554) or by the user interface module 826, depending on whetherthe user is accessing the video feeds and corresponding historiesthrough a web browser 823 or an application 824 (e.g., a dedicated smarthome management application) at the client device 504. The devices andsystems shown in and described with respect to FIGS. 6-10 are merelyillustrative, and different configurations of the modules forimplementing the functions described herein are possible in variousimplementations.

Switching from Night Mode to Day Mode

Illuminant Detection

As mentioned above, in some implementations, a camera 118 utilizes acombination of illuminant detection, lux level detection, and tiling todetermine when to switch from Night mode to Day mode. In someimplementations, one or more of these evaluations/operations areperformed by the mode control program module 960 b (FIG. 9B), whichsubsequent to the determination initiates a switch from Night mode toDay mode if justified by the evaluations/operations.

Illuminant detection involves determining the type of primary lightsource that is illuminating a scene or a portion of a scene captured bythe camera 118. During development of the systems and method describedherein, experiments were performed to measure in Night mode specificcombinations of red (R), green (G), and blue (B) color components andlux associated with different light source types/lighting conditions atdifferent distances from the camera 118. All measurements werenormalized to IR only against a flat white reflective service and R/Gand B/G plotted for the different light source types.

The light source types/lighting conditions that were evaluated representthe wide range of light source types that might be found in environments(e.g., home, office, retail business) where security cameras 118 areinstalled, including:

-   -   Special Blue (SB) filling the camera field of view measured in        Day mode (this is a particular blue that when illuminated by        shad sunlight looks like pure IR illumination);    -   Christmas lights;    -   Combination of fluorescent and incandescent lights illuminating        a scene at close range;    -   Incandescent lights illuminating a scene;    -   Fluorescent lights illuminating a scene at close range;    -   Low sunlight;    -   Far room HDR (situation where a camera is looking into a long        room (e.g., 20 meters deep) where the scene has very high        dynamic range (e.g., very dark and very light regions);    -   Light from just trees outside a window;    -   Light from a combination of sky and trees outside a window;    -   Purely IR light (0 lux measured in Night mode);    -   Sunlight;    -   Special Blue 9SB) filling the camera field of view in Night        mode;    -   Overall ambient illumination at 5 lux (measured in Night mode);    -   Overall ambient illumination at 15 lux (measured in Night mode);

The resulting measurements are shown in FIG. 11A, which is a graph ofR/G vs. B/G ratios for the different lighting conditions identifiedabove. The graph legend identifies the marks used to indicate the typeof light source/lighting condition associated with the differentmeasurements. The graph in FIG. 11A shows that it is possible toidentify when a scene is being illuminated solely by IR light (e.g., seethe boxed-in cluster 1002 of marks associated with 0 lux measurements,which are located near the intersection of R/G=1 and B/G=1). In someimplementations, different light source types/lighting conditions can beevaluated in a similar manner to identify color temperaturecharacteristics associated with different relevant light source typesfor different environments. Similarly, in some implementations,different functions of color components (e.g., not just R/G and B/Gratios) can be used to evaluate color temperature characteristics ofdifferent light source types. That said, it is particularly effective touse R/G and B/G ratios since those values are provided automatically bythe AWB processing module 960 a as part of auto white balance (AWB)processing performed in most digital cameras.

Lux Level Detection

In some implementations, identifying the color temperature of the lightsource (illuminant detection, described above) that is dominating thescene is only one part of determining whether or not to switch to Daymode. Some implementations also determine how much ambient light isavailable, i.e. what is the lux level of the ambient light. In someimplementations, this is done by detecting the analog gain being appliedto the image. (e.g., the gain applied to image sensor measurements). Insome implementations, analog gain has a range of 0 db to 36 db. In someimplementations, in Night mode, the frame rate can be 7.5, 15, or 30frames per second (fps). Going from 30 fps to 15 fps is equivalent to a6 db increase in analog gain; similarly going from 15 fps to 7.5 fpscorresponds to another 6 db increase in analog gain. (This is similar tothe direct relationship between the sensitivity of an image sensor andslower shutter speeds). Therefore, some implementations normalize analoggain to 30 fps then compare the current analog gain to a threshold inorder to determine if there is sufficient light to afford enoughhysteresis to switch from Night mode to Day mode. For example, someimplementations switch from Night mode to Day mode at a higher lux levelthan from Day mode to Night mode; this is to prevent the camera 118 fromswitching back to the prior mode—e.g., switching back to Night modeimmediately following a mode switch to Day mode). During experimentaltesting described above with respect to FIG. 11A, it was found thatcertain light sources (e.g., Christmas lights, incandescent lights andshady sunlight) have very high IR components, and since thesemeasurements are being made in “Nightmode”, i.e., when there is no IRfilter, those IR components cause the apparent lux level to appear to bevery high, even though the visible light was quite low. In order toaddress this issue, some implementations turn once again to illuminantdetection to help determine the analog gain threshold at which we willswitch from Night mode to Daymode.

FIG. 11B is a graph of R/G vs. B/G (where R, G, and B represent red,green and blue illuminant components) for different lighting conditions,outlining a region 1110 associated with sunlight and incandescentlights. In some implementations, the outlined region has a differentanalog gain threshold than all other illuminants, meaning that, due topresence of high amounts of IR in sunlight and incandescent lights, insome implementations, the measured lux in Night mode associated withsuch light sources needs to be higher for a switch to occur to Day modethan for other non-IR light sources (e.g., the non-IR light sourceswhose associated R/G and B/G ratios fall outside thesunlight/incandescent region 1110.

In some implementations of Night mode to Day mode switching methods, oneor more lookup tables (e.g., the lookup tables 9764, 9766) are used torepresent the graphs of FIGS. 11A and 11B so as to enable the camera 118to efficiently identify lighting conditions for light received at all ora portion of the image sensor array 9624 based on R/G and B/G ratios(i.e., the indices into the one or more lookup tables) of the receivedlight. In some implementations, other methods can also be used torepresent the graphs of FIGS. 11A and 11B.

Tiling

Illuminant detection can be applied to an entire image or to any portionof an image. By breaking up an image into tiles it is possible todetermine if a particular illuminant is predominantly occurring in onlya small portion of the image and therefore does not warrant a Nigh modeto Day mode switch. This is especially useful in detecting point sourcesof light (e.g., flashlights). Advantages of a tiling approach ascompared to a non-tiling approach are illustrated in FIGS. 12A and 12B,which show the very different video images produced by two identicalcameras 118 using different methods to decide when to switch from Nightmode to Day mode.

FIG. 12A is an image from a camera implementing a prior mode techniqueshowing a result of incorrectly transitioning from Night mode to Daymode due to light from a flashlight fooling the camera into thinkingthat there is enough visible light in the scene. Note in FIG. 12A thatthe scene is entirely dark except for the flashlight, indicating thatthe scene is not adequately illuminated for Day mode operations. Incontrast, FIG. 12B is an image from a camera showing a result ofdeciding based on a tiling approach not to transition from Night mode toDay mode in the lighting conditions of FIG. 12A, in accordance with someimplementations. By applying a tiling approach, the effect of theflashlight is restricted to tiles of the image sensor corresponding tothe position in the image of the flashlight. As a result, the Night modeto Day mode switching does not occur due to limited impact of theflashlight on the lux level detected for other tiles of the imagesensor.

FIG. 12C is an illustration of a tiled arrangement used for processingambient light in Night mode in accordance with some implementationsoverlaid on the image of FIG. 12B. This tiling, which is illustrative,shows how the flashlight is contained in one tile, which in accordancewith some implementations prevents the camera from switching to Day modeprematurely.

FIG. 13A is a flowchart of a method 1300 implemented in a camera 118(FIG. 9B) for deciding when to switch from Night mode to Day mode, inaccordance with some implementations. In some implementations, themethod 1300 is performed by a camera with one or more processors,memory, a lens assembly, and IR filter assembly, and an image sensor.For example, in some implementations, the method 1300 is performed by acamera 118 (FIGS. 9B-9D), or one or more components thereof (e.g.,operating logic 956, video control module 960 (including auto whitebalance module 960 a, mode control module 960 b), video capturing module964, video caching module 966 and local video processing module 968). Insome implementations, the method 1400 is governed by instructions thatare stored in a non-transitory computer readable storage medium (e.g.,the memory 946) and the instructions are executed by one or moreprocessors of the electronic device (e.g., the CPUs 942). Optionaloperations are indicated by dashed lines (e.g., boxes with dashed-lineborders). In some implementations, the method 1300 uses data stored inthe memory 946 of the camera 118, including frame rate 972 a, analogsensor gain 972 b, raw sensor data 9760, AWB data 9762, All_lightslookup table (LUT) 9764, and Sunlight/incandescent lookup table (LUT)9766.

Examples of the All_lights lookup table (LUT) 9764, and theSunlight/incandescent lookup table (LUT) 9766 are shown in FIGS. 13B and13C, in accordance with some implementations. These tables correspond tothe graphs shown in FIGS. 11A and 11B but are structured as lookuptables to permit efficient implementation of illuminant detection aspart of the described methods. Referring to FIG. 13B, in someimplementations, the All_lights lookup table 9764 is populated with 1'sexcept for a small region 1340 populated with 0's located near theintersection of B/G=1 and R/G=1, which is associated with 0 lux (or pureIR) illuminants. The region 1342 of this table indicates ranges of B/Gand R/G ratios associated with illuminants that are sunlight orincandescent light. Performing a lookup into the All_lights lookup table9764 using a pair of B/G and R/G ratios for an associated sensor region(converted to appropriately scaled integers) as indices into the tablewill return “0” for 0 lux illuminants and “1” for other than pure IRilluminants—to indicate the predominant illuminant type for that sensorregion. Referring to FIG. 13C, in some implementations, the Sunlightlookup table 9766 is a higher resolution representation of the sunlightincandescent region 1342 of FIG. 13B. The Sunlight lookup table 9766 ispopulated with 1's for ranges of B/G and R/G associated with sunlightand incandescent illuminants and 0's elsewhere (e.g., for all otherilluminant types). The higher resolution representation of thesunlight/incandescent region 1342 enables fine distinctions to be madebetween the color profiles (e.g., color component ratios) ofsunlight/incandescent illuminants, which require higher lux levels forswitching to Day mode, and other illuminants with similar colorprofiles, which require default (lower) lux levels for switching to Daymode. Performing a lookup into this table using a pair of B/G and R/Gratios for an associated sensor region (converted to appropriatelyscaled integers) as indices into the table will return “0” for sunlightand incandescent illuminants and “1” for other types of illuminants—toindicate the predominant illuminant type for that sensor region. Asnoted above, the lookup tables illustrated in FIGS. 13B and 13C areexamples used in some implementations. Other implementations can employone or more lookup tables for the same purpose (e.g., a single lookuptable with enough resolution to accurately identify illuminants thathave color characteristics of sunlight or incandescent lights), can usevalues other than “0” and “1” to represent regions of interest (e.g.,sunlight and 0 lux regions), can be structured differently (e.g., asother than 2-dimensional tables), and can be accessed using differentindices (e.g., raw R, G and B components instead of color componentratios).

The method 1300 presumes a tiling approach in which illuminant and luxdetection operations are performed for each of plurality of tiles thatcollectively compose the sensor (FIG. 12C). The method can also beapplied to implementations where the sensor is not tiled (in which casethe number of tiles, “num_tiles,” referred to in the method 1300 equals1).

As described above, in some implementations sensor gain is normalized(1310) so measured analog sensor gain can be compared to predefinedswitching thresholds. E.g., in some implementations, sensor gain isnormalized to a particular frame rate (e.g., 30 fps).

In some implementations, the method 1300 optionally adjusts power of theonboard IR LEDs 9626 as function of normalized analog gain (i.e. luxlevel) (1312). In particular, if the measured lux level is low, IR LEDPower is increased; if the measured lux level is high, then IR LED poweris decreased. In some implementations, illuminant detection is notperformed until the IR LED power is 1/100th of the max IR LED power(indicating that there is very little need for on-board illumination ofthe scene).

As in initial step in illuminant detection, RGB statistics (e.g., ratiosor raw component values) are obtained for each tile (or for the entiresensor array) (1314). In some implementations, the RGB statistics arederived from the raw sensor data 9760 or the AWB data 9762 (FIG. 9B).The following operations are then performed for each tile as part ofilluminant detection (1316):

-   -   Calculate the ratio of average R component values to average G        component values (the result is the average ratio R/G for the        tile);    -   Calculate the ratio of average B component values to average G        component values (the result is the average ratio B/G for the        tile);    -   Using the calculated B/G and R/G values for the tile, peform a        lookup operation in the All_lights LUT using the pair of ratios        (converted to appropriately scaled integers) as indices into the        table, and add the returned value (“0”=0 lux; “1”=other than IR)        to a variable, “All_lights_sum,” that keeps track of the number        of tiles for which an illuminant other than a purely IR source        is detected; thus, each individual “1” value returned from the        All_lights table acts as a mode change signal that provides an        individual vote for switching from Night mode to Day mode based        on the characteristics of the predominant illuminant for that        tile;    -   Using the calculated B/G and R/G values for the tile, peform a        lookup operation in the Sunlight LUT using the pair of ratios        (converted to appropriately scaled integers) as indices into the        table, and add the returned value (0=not sunlight.incandescent;        1=sunlight/incandescent) to a variable, “Sunlight_sum,” that        keeps track of the number of tiles for which an illuminant that        is sunlight or incandescent light is detected;

Having performed the above operations across all of the tiles (or theentire image sensor array), the total number of tiles illuminated byother than pure IR illuminants (“All_lights_sum”) is compared to athreshold number of tiles*1318). In some implementations, the thresholdnumber of tiles is the total number of sensor tiles divided by 2(“num_tiles/2”). Other implementations can employ other thresholds. Thetotal number of tiles illuminated by sunlight (“Sunlight_sum”) is alsocompared to a threshold number of tiles (1318). In some implementations,the threshold number of tiles is the total number of tiles divided by 2(“num_tiles/2”). Other implementations can employ other thresholds.

If the total number of tiles illuminated by other than pure IRilluminants (“All_lights_sum”) and the total number of tiles illuminatedby sunlight (“Sunlight_sum”) are both less than the threshold(1318-Yes), the camera will stay in Night mode (1330). Otherwise, theweighted total number of tiles illuminated by other than pure IRilluminants (“All_lights_sum/2”) is compared to the total number oftiles illuminated by sunlight and incandescent light sources(“Sunlight_sum”) (1320). If the weighted total number of tilesilluminated by other than pure IR illuminants (All_lights sum/2) isgreater than the total number of tiles illuminated by sunlight(“Sunlight_sum”) (1320-Yes) (indicating that the predominant illuminantis not sunlight), the maximum analog “Gain Switch Threshold” forswitching to Day mode is set at a predefined default gain switchthreshold (1332). Otherwise (1320-No) (indicating that the predominantilluminant is sunlight), the maximum analog “Gain Switch Threshold” forswitching to Day mode is set at a predefined sunlight gain threshold,which is lower than the default gain switch threshold (1322). In thepreceding discussion, it is presumed that a higher analog sensor gainindicates a lower ambient light level (i.e. less lux). Thus, asdescribed above, when the predominant light source is sunlight orincandescent light, more lux is required to enable switching to Day modefrom Night mode.

The “Gain Switch Threshold” is then compared to the current analogsensor gain (1324). If the analog sensor gain is less than or equal tothe “Gain Switch Threshold,” (1324-Yes), the camera is switched to Daymode (1325). Otherwise (1324-No), the camera 118 will stay in Night mode(1334).

FIGS. 14A-14C illustrate a flowchart diagram of a method 1400 fordetermining when to switch a camera from Night mode to Day mode, inaccordance with some embodiments. In some implementations, the method1400 is performed by a camera with one or more processors, memory, alens assembly and an image sensor (1402). For example, in someimplementations, the method 1400 is performed by a camera 118 (FIGS.9B-9D), or one or more components thereof (e.g., operating logic 956,video control module 960 (including auto white balance module 960 a,mode control module 960 b), video capturing module 964, video cachingmodule 966 and local video processing module 968). In someimplementations, the method 1400 is governed by instructions that arestored in a non-transitory computer readable storage medium (e.g., thememory 946) and the instructions are executed by one or more processorsof the electronic device (e.g., the CPUs 942). Optional operations areindicated by dashed lines (e.g., boxes with dashed-line borders).

Referring to FIG. 14A, in some implementations, the camera includes acontroller, memory storing instructions for execution by the controller,a color sensor array comprising a plurality of sensor locations, thesensor locations including first, second and third pixels each havingrespective peak responses at different respective visible lightfrequencies, and a lens assembly that is configured to focus light onthe sensor array (1402). When the camera mode is Night mode and thesensor is exposed to ambient light via the lens assembly: the cameradetects a first light component of the ambient light by averaging outputsignals from the first pixels; detecting a second light component of theambient light by averaging output signals from the second pixels;detects a third light component of the ambient light by averaging outputsignals from the third pixels; determines based on respective values ofthe first, second and third light components whether the ambient lightis due to other an IR light source; and detects the ambient light level(1404). Based on a determination that the ambient light is due to otherthan an IR light source and the ambient light level exceeds a first luxthreshold, the camera initiates a change of the camera mode to Day mode(1406). Based on a determination that the ambient light is due to otherthan an IR light source and the ambient light threshold does not exceedthe first lux threshold, the camera mode is maintained in Night mode(1408).

In some implementations, the first, second and third light componentsare red, green and blue. In some implementations, the camera includes again controller that adjusts analog gain of the sensor array based onthe ambient light level; such that detecting the ambient light levelincludes obtaining the analog gain of the sensor array. In someimplementations, the analog gain of the sensor varies with a frame rateof the camera, such that the camera determines a first frame rate of thecamera used to detect the first, second and third light components; andnormalizes the obtained analog gain of the sensor based on a firstdifference between the first frame rate and a predefined frame rate andpredefined associated differences in analog sensor gain based on thefirst difference. In some implementations, the camera includes an IRfilter with a first position in which it is interposed between the lensand the sensor array and a second position in which it is not interposedbetween the lens and sensor array, such that, as part of initiating achange of the camera mode to the day mode, the camera switches thecamera mode to the day mode and causes the IR filter to be moved fromthe second position to the first position.

Referring to FIG. 14B, in some implementations, the camera determinesbased on values of the first, second and third light components whetherthe ambient light is due to sunlight or an incandescent light source;and based on a determination that the ambient light is due to sunlightor an incandescent light source, initiates a change of the camera modeto the day mode only when the ambient light level exceeds a second luxthreshold higher than the first lux threshold (1412).

In some implementations, the camera obtains a first ratio of the firstto the second lighting components of the ambient light; obtains a secondratio of the third to the second lighting components of the ambientlight; and obtains a graph characterizing respective types of lightsource based on a combination of the first and second ratios associatedwith the respective types of light sources; the camera determineswhether the ambient light is due to other than an IR light source (e.g.,as recited at step 1406) by determining based on the graph whether alight source characterized by the first ratio and the second ratio isother than an IR light source (1414). In some implementations,determining whether the ambient light is due to other than an IR lightsource includes determining that a point defined by the first ratio andthe second ratio is substantially different from (1, 1). In someimplementations, the camera includes an auto white balance processorthat provides the obtained first and second ratios.

In some implementations, the graph identifies a first region defined byspecific respective ranges of the first and the second ratios as beingassociated with sunlight or incandescent light sources; the cameradetermines whether the ambient light is due to sunlight or anincandescent light source (e.g., as recited at step 1414) by determiningbased on the graph whether a point defined by the first ratio and thesecond ratio lies within the first region (1416).

In some implementations, the graph is represented using two look-uptables, each addressable by a first index representing one of the firstratios and a second index representing one of the second ratios; whereina first one of the lookup tables defines combinations of the first andsecond ratios associated respectively with IR light sources and otherthan IR light sources, and a second one of the lookup tables definescombinations of the first and second ratios associated with sunlight andincandescent lights (1418).

Referring to FIG. 14C, in some implementations, the first lookup tableencodes with 1's first table locations associated with other than IRlight sources and with 0's first table locations associated with IRlight sources, such that the first lookup table is almost entirelyfilled with all 1's apart from table locations associated with pairs offirst and second ratios substantially similar to (1.1) (1424).

In some implementations, the second lookup table corresponds to ahigher-resolution version of a sub-region of the first lookup table,wherein the second lookup table encodes with 1's second table locationsassociated with sunlight and incandescent light sources and with 0'ssecond table locations associated with other than sunlight andincandescent light sources (1426).

In some implementations, the color sensor array is one tile of aplurality of tiles in a color sensor array system and the method ofclaim 1 is performed for each of the tiles, such that a respective modechange signal is generated for a respective tile for which the ambientlight at that respective tile is due to other than an IR light sourceprior to initiating the change of the camera mode to the day mode; inwhich the camera further: determines a total number of the mode changesignals for the color sensor array system; determines whether the totalnumber of the mode change signals exceeds a predetermined mode changethreshold based on a total number of tiles in the color sensor arraysystem; and when the total number of the mode change signals exceeds themode change threshold, initiates the change of the camera mode to theday mode (1422).

Although some of various drawings illustrate a number of logical stagesin a particular order, stages that are not order dependent may bereordered and other stages may be combined or broken out. While somereordering or other groupings are specifically mentioned, others will beobvious to those of ordinary skill in the art, so the ordering andgroupings presented herein are not an exhaustive list of alternatives.Moreover, it should be recognized that the stages could be implementedin hardware, firmware, software or any combination thereof.

The foregoing description, for purpose of explanation, has beendescribed with reference to specific implementations. However, theillustrative discussions above are not intended to be exhaustive or tolimit the scope of the claims to the precise forms disclosed. Manymodifications and variations are possible in view of the aboveteachings. The implementations were chosen in order to best explain theprinciples underlying the claims and their practical applications, tothereby enable others skilled in the art to best use the implementationswith various modifications as are suited to the particular usescontemplated.

What is claimed is:
 1. A method for controlling a camera mode,comprising: in a camera including a controller, memory storinginstructions for execution by the controller, a color sensor arraycomprising a plurality of sensors, the sensors including first, secondand third pixels each having respective peak responses at differentrespective visible light frequencies, an IR filter, and a lens assemblythat is configured to focus light on the sensor array: when the cameramode is a night mode, wherein in the night mode, the IR filter is notinterposed between the lens assembly and the sensor array, and thesensor array is exposed to ambient light via the lens assembly withoutinterference by the IR filter: detecting a first light component of theambient light by averaging output signals from the first pixels;detecting a second light component of the ambient light by averagingoutput signals from the second pixels; detecting a third light componentof the ambient light by averaging output signals from the third pixels;determining based on respective values of the first, second and thirdlight components whether the ambient light is due to other than an IRlight source; detecting the ambient light level; based on adetermination that the ambient light that is not filtered by the IRfilter is due to other than an IR light source and that the ambientlight level exceeds a first lux threshold, initiating a change of thecamera mode to a day mode; based on a determination that the ambientlight that is not filtered by the IR filter is due to other than an IRlight source and that the ambient light threshold does not exceed thefirst lux threshold, maintaining the camera in the night mode.
 2. Themethod of claim 1, further comprising: determining based on values ofthe first, second and third light components whether the ambient lightis due to sunlight or an incandescent light source; and based on adetermination that the ambient light is due to sunlight or anincandescent light source, initiating a change of the camera mode to theday mode only when the ambient light level exceeds a second luxthreshold higher than the first lux threshold.
 3. The method of claim 2,further comprising: obtaining a first ratio of the first to the secondlighting components of the ambient light; obtaining a second ratio ofthe third to the second lighting components of the ambient light; andobtaining a graph characterizing respective types of light source basedon a combination of the first and second ratios associated with therespective types of light sources; wherein determining whether theambient light is due to other than an IR light source includesdetermining based on the graph whether a light source characterized bythe first ratio and the second ratio is other than an IR light source.4. The method of claim 3, wherein the graph identifies a first regiondefined by specific respective ranges of the first and the second ratiosas being associated with sunlight or incandescent light sources; whereindetermining whether the ambient light is due to sunlight or anincandescent light source includes determining based on the graphwhether a point defined by the first ratio and the second ratio lieswithin the first region.
 5. The method of claim 1, wherein the first,second and third light components are red, green and blue.
 6. The methodof claim 3, wherein determining whether the ambient light is due toother than an IR light source includes determining that a point definedby the first ratio and the second ratio is substantially different from(1, 1).
 7. The method of claim 1, wherein the camera includes a gaincontroller that adjusts analog gain of the sensor array based on theambient light level; such that detecting the ambient light levelcomprises obtaining the analog gain of the sensor array.
 8. The methodof claim 7, wherein the analog gain of the sensor varies with a framerate of the camera, further comprising: determining a first frame rateof the camera used to detect the first, second and third lightcomponents; and normalizing the obtained analog gain of the sensor basedon a first difference between the first frame rate and a predefinedframe rate and predefined associated differences in analog sensor gainbased on the first difference.
 9. The method of claim 1, wherein the IRfilter has a first position in which it is interposed between the lensand the sensor array and a second position in which it is not interposedbetween the lens and sensor array, further comprising: in response toinitiating the change of the camera mode to the day mode, switching thecamera mode to the day mode and causing the IR filter to be moved fromthe second position to the first position.
 10. The method of claim 1,wherein the camera includes an auto white balance processor thatprovides the obtained first and second ratios.
 11. The method of claim1, wherein: the color sensor array is one tile of a plurality of tilesin a color sensor array system and the method of claim 1 is performedfor each of the tiles, such that a respective mode change signal isgenerated for a respective tile for which the ambient light at thatrespective tile is due to other than an IR light source prior toinitiating the change of the camera mode to the day mode; furthercomprising: determining a total number of the mode change signals forthe color sensor array system; determining whether the total number ofthe mode change signals exceeds a predetermined mode change thresholdbased on a total number of tiles in the color sensor array system; andwhen the total number of the mode change signals exceeds the mode changethreshold, initiating the change of the camera mode to the day mode. 12.The method of claim 4, wherein the graph is represented using twolook-up tables, each addressable by a first index representing one ofthe first ratios and a second index representing one of the secondratios; wherein a first one of the lookup tables defines combinations ofthe first and second ratios associated respectively with IR lightsources and other than IR light sources, and a second one of the lookuptables defines combinations of the first and second ratios associatedwith sunlight and incandescent lights.
 13. The method of claim 12,wherein the first lookup table encodes with 1's first table locationsassociated with other than IR light sources and with 0's first tablelocations associated with IR light sources, such that the first lookuptable is almost entirely filled with all 1's apart from table locationsassociated with pairs of first and second ratios substantially similarto (1.1).
 14. The method of claim 12, wherein the second lookup tablecorresponds to a higher-resolution version of a sub-region of the firstlookup table, wherein the second lookup table encodes with 1's secondtable locations associated with sunlight and incandescent light sourcesand with 0's second table locations associated with other than sunlightand incandescent light sources.
 15. A camera mode control system for acamera, comprising: a controller, memory storing programs for executionby the controller, a color sensor array comprising a plurality ofsensors, the sensors including first, second and third pixels, eachhaving respective peak responses at different respective visible lightfrequencies, a lens assembly that is configured to focus light on thesensor array, and an IR filter that is not interposed between the lensassembly and the sensor array in a night mode; the one or more programsincluding instructions for: when the camera mode is the night mode andthe sensor is exposed to ambient light via the lens assembly withoutinterference by the IR filter: detecting a first light component of theambient light by averaging output signals from the first pixels;detecting a second light component of the ambient light by averagingoutput signals from the second pixels; detecting a third light componentof the ambient light by averaging output signals from the third pixels;determining based on respective values of the first, second and thirdlight components whether the ambient light is due to other an IR lightsource; detecting the ambient light level; based on a determination thatthe ambient light that is not filtered by the IR filter is due to otherthan an IR light source and that the ambient light level exceeds a firstlux threshold, initiating a change of the camera mode to a day mode; andbased on a determination that the ambient light that is not filtered bythe IR filter is due to other than an IR light source and that theambient light threshold does not exceed the first lux threshold,maintaining the camera in the night mode.
 16. The system of claim 15,wherein the one or more programs further include instructions for:determining based on values of the first, second and third lightcomponents whether the ambient light is due to sunlight or anincandescent light source; and based on a determination that the ambientlight is due to sunlight or an incandescent light source, initiating achange of the camera mode to the day mode only when the ambient lightlevel exceeds a second lux threshold higher than the first luxthreshold.
 17. The system of claim 16, wherein the one or more programsfurther include instructions for: obtaining a first ratio of the firstto the second lighting components of the ambient light; obtaining asecond ratio of the third to the second lighting components of theambient light; and obtaining a graph characterizing respective types oflight source based on a combination of the first and second ratiosassociated with the respective types of light sources; whereindetermining whether the ambient light is due to other than an IR lightsource includes determining based on the graph whether a light sourcecharacterized by the first ratio and the second ratio is other than anIR light source.
 18. The system of claim 17, wherein the graphidentifies a first region defined by specific respective ranges of thefirst and the second ratios as being associated with sunlight orincandescent light sources; and wherein determining whether the ambientlight is due to sunlight or an incandescent light source includesdetermining based on the graph whether a point defined by the firstratio and the second ratio lies within the first region.
 19. The systemof claim 15, wherein the color sensor array is one tile of a pluralityof tiles in a color sensor array system and the instructions of claim 15are implemented for each of the tiles, such that a respective modechange signal is generated for a respective tile for which the ambientlight at that respective tile is due to other than an IR light sourceprior to initiating the change of the camera mode to the day mode; andwherein the one or more programs further include instructions for:determining a total number of the mode change signals for the colorsensor array system; determining whether the total number of the modechange signals exceeds a predetermined mode change threshold based on atotal number of tiles in the color sensor array system; and when thetotal number of the mode change signals exceeds the mode changethreshold, initiating the change of the camera mode to the day mode. 20.A non-transitory computer readable storage medium storing one orprograms for execution by a camera system including a controller, acolor sensor array comprising a plurality of sensors, the sensorsincluding first, second and third pixels, each having respective peakresponses at different respective visible light frequencies, a lensassembly that is configured to focus light on the sensor array, and anIR filter that is not interposed between the lens assembly and thesensor array in a night mode, the one or more programs comprisinginstructions for: when the camera mode is the night mode and the sensoris exposed to ambient light via the lens assembly without interferenceby the IR filter: detecting a first light component of the ambient lightby averaging output signals from the first pixels; detecting a secondlight component of the ambient light by averaging output signals fromthe second pixels; detecting a third light component of the ambientlight by averaging output signals from the third pixels; determiningbased on respective values of the first, second and third lightcomponents whether the ambient light is due to other an IR light source;detecting the ambient light level; based on a determination that theambient light that is not filtered by the IR filter is due to other thanan IR light source and that the ambient light level exceeds a first luxthreshold, initiating a change of the camera mode to a day mode; andbased on a determination that the ambient light that is not filtered bythe IR filter is due to other than an IR light source and that theambient light threshold does not exceed the first lux threshold,maintaining the camera in the night mode.
 21. The non-transitorycomputer readable storage medium of claim 20, the one or more programsfurther comprising instructions for: determining based on values of thefirst, second and third light components whether the ambient light isdue to sunlight or an incandescent light source; and based on adetermination that the ambient light is due to sunlight or anincandescent light source, initiating a change of the camera mode to theday mode only when the ambient light level exceeds a second luxthreshold higher than the first lux threshold.
 22. The non-transitorycomputer readable storage medium of claim 21, the one or more programsfurther comprising instructions for: obtaining a first ratio of thefirst to the second lighting components of the ambient light; obtaininga second ratio of the third to the second lighting components of theambient light; and obtaining a graph characterizing respective types oflight source based on a combination of the first and second ratiosassociated with the respective types of light sources; whereindetermining whether the ambient light is due to other than an IR lightsource includes determining based on the graph whether a light sourcecharacterized by the first ratio and the second ratio is other than anIR light source.
 23. The non-transitory computer readable storage mediumof claim 20, wherein the camera includes a gain controller that adjustsanalog gain of the sensor array based on the ambient light level, suchthat detecting the ambient light level comprises obtaining the analoggain of the sensor array.
 24. The non-transitory computer readablestorage medium of claim 20, wherein the IR filter has a first positionin which it is interposed between the lens and the sensor array and asecond position in which it is not interposed between the lens andsensor array, the one or more programs further comprising instructionsfor: in response to initiating the change of the camera mode to the daymode, switching the camera mode to the day mode and causing the IRfilter to he moved from the second position to the first position. 25.The non-transitory computer readable storage medium of claim 20, whereinthe color sensor array is one tile of a plurality of tiles in a colorsensor array the system and the instructions of claims 20 areimplemented on each of the tiles, such that a respective mode changesignal is generated for a respective tile for which the ambient light atthat respective tile is due to other than an IR light source prior toinitiating the change of the camera mode to the day mode; and whereinthe one or more programs further comprise instructions for: determininga total number of the mode change signals for the color sensor arraysystem; determining whether the total number of the mode change signalsexceeds a predetermined mode change threshold based on a total number oftiles in the color sensor array system; and when the total number of themode change signals exceeds the mode change threshold, initiating thechange of the camera mode to the day mode.